Browse Source

[4047] Corrected order of calls in the TimerMgr unit test.

Marcin Siodelski 9 years ago
parent
commit
ac8820c71a
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/lib/dhcpsrv/tests/timer_mgr_unittest.cc

+ 4 - 5
src/lib/dhcpsrv/tests/timer_mgr_unittest.cc

@@ -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