From 8d7d5627919305a0b9bd4712dfe5238ad670d6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 28 Feb 2016 08:18:09 +0100 Subject: Replace calls to test_server:sleep/1 with ct:sleep/1 or timer:sleep/1 Note that the sleeping time in ct:sleep/1 will be scaled if the test is run with (for example) cover. When it is important that the sleep time is not adjusted, use timer:sleep/1. --- lib/stdlib/test/supervisor_SUITE.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/stdlib/test/supervisor_SUITE.erl') diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl index fab321f9df..42775cf77d 100644 --- a/lib/stdlib/test/supervisor_SUITE.erl +++ b/lib/stdlib/test/supervisor_SUITE.erl @@ -1484,18 +1484,18 @@ count_restarting_children(Config) when is_list(Config) -> supervisor_deadlock:restart_child(Ch1_1), supervisor_deadlock:restart_child(Ch1_2), supervisor_deadlock:restart_child(Ch1_3), - test_server:sleep(400), + ct:sleep(400), [1,3,0,3] = get_child_counts(SupPid), [Ch2_1, Ch2_2, Ch2_3] = [C || {_,C,_,_} <- supervisor:which_children(SupPid)], ets:insert(supervisor_deadlock,{fail_start,true}), supervisor_deadlock:restart_child(Ch2_1), supervisor_deadlock:restart_child(Ch2_2), - test_server:sleep(4000), % allow restart to happen before proceeding + ct:sleep(4000), % allow restart to happen before proceeding [1,1,0,3] = get_child_counts(SupPid), ets:insert(supervisor_deadlock,{fail_start,false}), - test_server:sleep(4000), % allow restart to happen before proceeding + ct:sleep(4000), % allow restart to happen before proceeding [1,3,0,3] = get_child_counts(SupPid), ok = supervisor:terminate_child(SupPid, Ch2_3), -- cgit v1.2.3