summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2015-09-18 13:20:08 +0200
committerMarcin Siodelski <marcin@isc.org>2015-09-18 13:20:08 +0200
commitac8820c71a5803980b18baf44ea34a05a7b8d7e1 (patch)
tree21ebd68d1209e9079274c569bd5af278725e86de /src/lib/dhcpsrv/tests/timer_mgr_unittest.cc
parent[4047] Cleanup in the TimerMgr unit tests. (diff)
downloadkea-ac8820c71a5803980b18baf44ea34a05a7b8d7e1.tar.xz
kea-ac8820c71a5803980b18baf44ea34a05a7b8d7e1.zip
[4047] Corrected order of calls in the TimerMgr unit test.
Diffstat (limited to 'src/lib/dhcpsrv/tests/timer_mgr_unittest.cc')
-rw-r--r--src/lib/dhcpsrv/tests/timer_mgr_unittest.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc b/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc
index 8854b7c950..944e99ddd4 100644
--- a/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc
+++ b/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