aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-01 17:58:41 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-01 17:58:41 +0200
commita3115154f754ed9f8db0dd0bfb07642efe54261c (patch)
tree07860ce1000f6480018a75c15e7023fabfe8a064 /lib/os_mon
parentd0378c0daf08fd0ddc22cf3e3fbb5b01794e623f (diff)
downloadotp-a3115154f754ed9f8db0dd0bfb07642efe54261c.tar.gz
otp-a3115154f754ed9f8db0dd0bfb07642efe54261c.tar.bz2
otp-a3115154f754ed9f8db0dd0bfb07642efe54261c.zip
Replace ?t:sleep/1 with ct:sleep/1
Diffstat (limited to 'lib/os_mon')
-rw-r--r--lib/os_mon/test/cpu_sup_SUITE.erl2
-rw-r--r--lib/os_mon/test/disksup_SUITE.erl6
-rw-r--r--lib/os_mon/test/memsup_SUITE.erl22
-rw-r--r--lib/os_mon/test/os_sup_SUITE.erl4
4 files changed, 17 insertions, 17 deletions
diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl
index f2caf85a60..dcd689407c 100644
--- a/lib/os_mon/test/cpu_sup_SUITE.erl
+++ b/lib/os_mon/test/cpu_sup_SUITE.erl
@@ -228,7 +228,7 @@ port(Config) when is_list(Config) ->
end,
%% Give cpu_sup time to restart cpu_sup port
- ?t:sleep(?t:seconds(3)),
+ ct:sleep({seconds, 3}),
N2 = cpu_sup:nprocs(),
true = N2>0,
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl
index 6ce88ac10d..0f0561571a 100644
--- a/lib/os_mon/test/disksup_SUITE.erl
+++ b/lib/os_mon/test/disksup_SUITE.erl
@@ -286,7 +286,7 @@ port(Config) when is_list(Config) ->
end,
%% Give os_mon_sup time to restart disksup
- ?t:sleep(?t:seconds(3)),
+ ct:sleep({seconds,3}),
[{_Disk2,Kbyte2,_Cap2}|_] = disksup:get_disk_data(),
true = Kbyte2>0,
@@ -364,7 +364,7 @@ otp_5910(Config) when is_list(Config) ->
%% Wait a little to make sure disksup has been restarted,
%% then make sure the alarms are set once, but not twice
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
Data3 = disksup:get_disk_data(),
Alarms2 = get_alarms(),
if
@@ -376,7 +376,7 @@ otp_5910(Config) when is_list(Config) ->
%% Stop OS_Mon and make sure all disksup alarms are cleared
ok = application:stop(os_mon),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
Alarms3 = get_alarms(),
case get_alarms() of
[] -> ok;
diff --git a/lib/os_mon/test/memsup_SUITE.erl b/lib/os_mon/test/memsup_SUITE.erl
index 2ad542042d..8c31a8c39a 100644
--- a/lib/os_mon/test/memsup_SUITE.erl
+++ b/lib/os_mon/test/memsup_SUITE.erl
@@ -215,7 +215,7 @@ alarm1(_Config, SysUsage) ->
ok = force_collection(),
%% Make sure the alarm is cleared/set
- ?t:sleep(?t:seconds(5)),
+ ct:sleep({seconds,5}),
case alarm_set(system_memory_high_watermark) of
{true, []} when not SysP ->
ok;
@@ -228,7 +228,7 @@ alarm1(_Config, SysUsage) ->
%% Reset the threshold to set/clear the alarm again
ok = memsup:set_sysmem_high_watermark(SysThreshold),
ok = force_collection(),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
case alarm_set(system_memory_high_watermark) of
{true, []} when SysP ->
ok;
@@ -267,7 +267,7 @@ alarm1(_Config, SysUsage) ->
end,
ok = memsup:set_procmem_high_watermark(NewProcThreshold),
ok = force_collection(),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
case alarm_set(process_memory_high_watermark) of
{true, WorstPid} when not ProcP ->
ok;
@@ -282,7 +282,7 @@ alarm1(_Config, SysUsage) ->
%% Reset the threshold to clear/set the alarm
ok = memsup:set_procmem_high_watermark(ProcThreshold),
ok = force_collection(),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
case alarm_set(process_memory_high_watermark) of
{true, WorstPid} when ProcP ->
ok;
@@ -366,7 +366,7 @@ alarm2(_Config, _SysUsage) ->
ok = force_collection(),
%% Make sure the alarm is cleared/set
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
case alarm_set(system_memory_high_watermark) of
{true, []} when not SysP ->
ok;
@@ -379,7 +379,7 @@ alarm2(_Config, _SysUsage) ->
%% Reset the threshold to set/clear the alarm again
ok = memsup:set_sysmem_high_watermark(SysThreshold),
ok = force_collection(),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
case alarm_set(system_memory_high_watermark) of
{true, []} when SysP ->
ok;
@@ -423,7 +423,7 @@ process(Config) when is_list(Config) ->
%% Start a new process larger than Worst
WorsePid = spawn(fun() -> new_hog(Bytes) end),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
%% Initiate and wait for a new data collection
ok = force_collection(),
@@ -621,7 +621,7 @@ port(Config) when is_list(Config) ->
end,
%% Give os_mon_sup time to restart memsup
- ?t:sleep(?t:seconds(3)),
+ ct:sleep({seconds,3}),
{Total2,_Alloc2,_Worst2} =
memsup:get_memory_data(),
true = Total2>0,
@@ -684,7 +684,7 @@ otp_5910(Config) when is_list(Config) ->
ok = memsup:set_procmem_high_watermark(0.5 *ProcUsage)
end,
ok = force_collection(),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
lists:foreach(fun(AlarmId) ->
case alarm_set(AlarmId) of
{true, _} -> ok;
@@ -700,7 +700,7 @@ otp_5910(Config) when is_list(Config) ->
exit(whereis(memsup), faked_memsup_crash),
%% Wait a little to make sure memsup has been restarted,
%% then make sure the alarms are set once, but not twice
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
MemUsage = memsup:get_memory_data(),
SetAlarms = alarm_handler:get_alarms(),
case lists:foldl(fun(system_memory_high_watermark, {S, P}) ->
@@ -720,7 +720,7 @@ otp_5910(Config) when is_list(Config) ->
%% Stop OS_Mon and make sure all memsup alarms are cleared
ok = application:stop(os_mon),
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
lists:foreach(fun(AlarmId) ->
case alarm_set(AlarmId) of
false -> ok;
diff --git a/lib/os_mon/test/os_sup_SUITE.erl b/lib/os_mon/test/os_sup_SUITE.erl
index fb30e479a7..8065b0b50c 100644
--- a/lib/os_mon/test/os_sup_SUITE.erl
+++ b/lib/os_mon/test/os_sup_SUITE.erl
@@ -77,7 +77,7 @@ message(Config) when is_list(Config) ->
os_sup_server ! {faked_port, {data, Data}},
%% Check with message_receptor that it has been received
- ?t:sleep(?t:seconds(1)),
+ ct:sleep({seconds,1}),
Msg =
case ?t:os_type() of
{unix, sunos} ->
@@ -138,7 +138,7 @@ port(Config) when is_list(Config) ->
end,
%% Give os_mon_sup time to restart os_sup
- ?t:sleep(?t:seconds(3)),
+ ct:sleep({seconds,3}),
true = is_pid(whereis(os_sup_server)),
ok;