A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests were wrong, fix them.
[simgrid.git]
/
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
6aa60c1
..
52d79a5
100644
(file)
--- a/
teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp
+++ b/
teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp
@@
-132,9
+132,11
@@
template <creator_type Create, tester_type Test, waiter_type Wait> void test_fai
Wait(activity);
FAIL("should not be here!");
});
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));
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));
actor->kill();
INFO("activity should be terminated now");
REQUIRE(Test(activity));
@@
-151,9
+153,11
@@
template <creator_type Create, tester_type Test, waiter_type Wait> void test_fai
Wait(activity);
FAIL("should not be here!");
});
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));
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");
actor->get_host()->turn_off();
actor->get_host()->turn_on();
INFO("activity should be terminated now");