From: g0dil Date: Tue, 3 Feb 2009 16:21:37 +0000 (+0000) Subject: Scheduler: Fix TimerEvent unit test reliability X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=34fd4548b1877daa2a7798c4e2b0e7d2454f3050;p=senf.git Scheduler: Fix TimerEvent unit test reliability git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1097 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Scheduler/TimerEvent.test.cc b/Scheduler/TimerEvent.test.cc index cbab9f6..e4f2b98 100644 --- a/Scheduler/TimerEvent.test.cc +++ b/Scheduler/TimerEvent.test.cc @@ -28,6 +28,7 @@ // Custom includes #include "TimerEvent.hh" +#include "Scheduler.hh" #include "../Utils//auto_unit_test.hh" #include @@ -61,12 +62,7 @@ BOOST_AUTO_UNIT_TEST(timerDispatcher) SENF_CHECK_NO_THROW( timer.disable() ); SENF_CHECK_NO_THROW( timer.enable() ); BOOST_CHECK( timer.enabled() ); - SENF_CHECK_NO_THROW( senf::scheduler::detail::TimerDispatcher::instance().enable() ); - SENF_CHECK_NO_THROW( senf::scheduler::detail::TimerDispatcher::instance().reschedule() ); - SENF_CHECK_NO_THROW( senf::scheduler::detail::FdManager::instance().processOnce() ); - SENF_CHECK_NO_THROW( senf::scheduler::detail::TimerDispatcher::instance().prepareRun() ); - SENF_CHECK_NO_THROW( senf::scheduler::detail::FIFORunner::instance().run() ); - SENF_CHECK_NO_THROW( senf::scheduler::detail::TimerDispatcher::instance().disable() ); + SENF_CHECK_NO_THROW( senf::scheduler::process() ); senf::ClockService::clock_type t2 (senf::ClockService::now()); BOOST_CHECK( called ); BOOST_CHECK( ! timer.enabled() );