Add delay - WatchDog test

pull/5192/head
Rahim Kanji 7 months ago
parent f1426ff99e
commit 3c79800a45

@ -571,7 +571,7 @@ bool RunWatchdogTest(const char* label, ThreadType* worker, unsigned int poll_ti
unsigned int missed = worker->watchdog_test__missed_heartbeats;
if (missed != last_missed) {
last_missed = missed;
proxy_info("Watchdog test: Missed heartbeats: %u\n", missed);
proxy_info("Watchdog test - Missed heartbeats: %u\n", missed);
}
if (success == false && missed == target_missed) {
@ -584,6 +584,13 @@ bool RunWatchdogTest(const char* label, ThreadType* worker, unsigned int poll_ti
worker->watchdog_test__simulated_delay_ms = 0;
worker->watchdog_test__missed_heartbeats = 0;
usleep(1000000);
if (worker->watchdog_test__missed_heartbeats != 0) {
worker->watchdog_test__simulated_delay_ms = 0;
worker->watchdog_test__missed_heartbeats = 0;
}
if (success) {
proxy_info("Watchdog test passed. Missed heartbeats: %u\n", target_missed);
} else {

Loading…
Cancel
Save