diff --git a/tests/isc/task_test.c b/tests/isc/task_test.c index cda67fcb1f..2d5d0d0a8c 100644 --- a/tests/isc/task_test.c +++ b/tests/isc/task_test.c @@ -571,7 +571,17 @@ ISC_RUN_TEST_IMPL(basic) { atomic_store(&done, true); + /* Let everything run for 10 seconds. */ sleep(10); + + /* + * Disable the timers, let all the already dispatched events to + * complete, and then destroy the timers. + */ + (void)isc_timer_reset(ti1, isc_timertype_inactive, NULL, NULL, true); + (void)isc_timer_reset(ti2, isc_timertype_inactive, NULL, NULL, true); + (void)isc_timer_reset(ti3, isc_timertype_inactive, NULL, NULL, true); + sleep(4); isc_timer_destroy(&ti1); isc_timer_destroy(&ti2); LOCK(&lock);