X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/019d409bb53264239490525cdac1f6a9d4e682db..db53c1c84df396bb6a4ee28c410688195d435dbd:/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp diff --git a/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp b/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp index 6aa60c148b..52d79a5d5c 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp @@ -132,9 +132,11 @@ template void test_fai Wait(activity); FAIL("should not be here!"); }); - simgrid::s4u::this_actor::sleep_for(2.0); + const double timestep = simgrid::s4u::Engine::get_clock() + 2.0; + simgrid::s4u::this_actor::sleep_for(1.0); INFO("activity should be still running"); REQUIRE(not Test(activity)); + simgrid::s4u::this_actor::sleep_until(timestep); actor->kill(); INFO("activity should be terminated now"); REQUIRE(Test(activity)); @@ -151,9 +153,11 @@ template void test_fai Wait(activity); FAIL("should not be here!"); }); - simgrid::s4u::this_actor::sleep_for(2.0); + const double timestep = simgrid::s4u::Engine::get_clock() + 2.0; + simgrid::s4u::this_actor::sleep_for(1.0); INFO("activity should be still running"); REQUIRE(not Test(activity)); + simgrid::s4u::this_actor::sleep_until(timestep); actor->get_host()->turn_off(); actor->get_host()->turn_on(); INFO("activity should be terminated now");