]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4047] Corrected order of calls in the TimerMgr unit test.
authorMarcin Siodelski <marcin@isc.org>
Fri, 18 Sep 2015 11:20:08 +0000 (13:20 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 18 Sep 2015 11:20:08 +0000 (13:20 +0200)
src/lib/dhcpsrv/tests/timer_mgr_unittest.cc

index 8854b7c95090686722b5f9c8d557c623fbe5ef91..944e99ddd4ee16971c283261e14c9ca4503bd372 100644 (file)
@@ -366,14 +366,13 @@ TEST_F(TimerMgrTest, scheduleTimers) {
     ASSERT_NO_FATAL_FAILURE(registerTimer("timer1", 1));
     ASSERT_NO_FATAL_FAILURE(registerTimer("timer2", 5));
 
-    // We can start the worker thread before we even kick in the timers.
-    ASSERT_NO_THROW(timer_mgr->startThread());
-
-    // Kick in the timers. The timers have been registered so there
-    // should be no exception.
+    // Kick in the timers.
     ASSERT_NO_THROW(timer_mgr->setup("timer1"));
     ASSERT_NO_THROW(timer_mgr->setup("timer2"));
 
+    // We can start the worker thread before we even kick in the timers.
+    ASSERT_NO_THROW(timer_mgr->startThread());
+
     // Run IfaceMgr::receive6() in the loop for 500ms. This function
     // will read data from the watch sockets created when the timers
     // were registered. The data is delivered to the watch sockets