diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-01 17:43:39 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-01 17:43:39 +0200 |
commit | 400d41eda5eca53b6b752c5b442d0f548266ce23 (patch) | |
tree | 4d2f1022071d3ccf70d4c3959236a6c00f2f71af /lib/os_mon/test/disksup_SUITE.erl | |
parent | 5d8ec8313876352d128c2fb6e368b77e85b479f0 (diff) | |
download | otp-400d41eda5eca53b6b752c5b442d0f548266ce23.tar.gz otp-400d41eda5eca53b6b752c5b442d0f548266ce23.tar.bz2 otp-400d41eda5eca53b6b752c5b442d0f548266ce23.zip |
Modernize use of timetraps
Diffstat (limited to 'lib/os_mon/test/disksup_SUITE.erl')
-rw-r--r-- | lib/os_mon/test/disksup_SUITE.erl | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl index 8e2825ec26..8e44122f47 100644 --- a/lib/os_mon/test/disksup_SUITE.erl +++ b/lib/os_mon/test/disksup_SUITE.erl @@ -21,7 +21,7 @@ -include_lib("common_test/include/ct.hrl"). %% Test server specific exports --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]). +-export([all/0, suite/0]). -export([init_per_suite/1, end_per_suite/1]). -export([init_per_testcase/2, end_per_testcase/2]). @@ -32,9 +32,6 @@ -export([otp_5910/1]). -export([posix_only/1]). -%% Default timetrap timeout (set in init_per_testcase) --define(default_timeout, ?t:minutes(1)). - init_per_suite(Config) when is_list(Config) -> ok = application:start(os_mon), Config. @@ -47,19 +44,18 @@ init_per_testcase(unavailable, Config) -> terminate(Config), init_per_testcase(dummy, Config); init_per_testcase(_Case, Config) -> - Dog = ?t:timetrap(?default_timeout), - [{watchdog,Dog} | Config]. + Config. end_per_testcase(TC, Config) when TC =:= unavailable; TC =:= posix_only -> restart(Config), end_per_testcase(dummy, Config); -end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), +end_per_testcase(_Case, _Config) -> ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> Bugs = [otp_5910], @@ -70,16 +66,6 @@ all() -> _OS -> [unavailable] end. -groups() -> - []. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - api(suite) -> []; api(doc) -> ["Test of API functions"]; api(Config) when is_list(Config) -> |