aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/misc_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-25 07:38:39 +0100
committerBjörn Gustavsson <[email protected]>2016-02-25 14:49:49 +0100
commit5fe95cec32ddc92f6a483c24f6f591586ba065f7 (patch)
treea5363e6e4a9ad07656db97db377f9975fcc3d05c /lib/compiler/test/misc_SUITE.erl
parent720ad8d62a908fa52ed2dcd34f30a01a940b2022 (diff)
downloadotp-5fe95cec32ddc92f6a483c24f6f591586ba065f7.tar.gz
otp-5fe95cec32ddc92f6a483c24f6f591586ba065f7.tar.bz2
otp-5fe95cec32ddc92f6a483c24f6f591586ba065f7.zip
Modernize use of timetraps
Either rely on the default 30 minutes timetrap, or set the timeout using the supported methods in common_test.
Diffstat (limited to 'lib/compiler/test/misc_SUITE.erl')
-rw-r--r--lib/compiler/test/misc_SUITE.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl
index 9c65151685..9c027bdc6b 100644
--- a/lib/compiler/test/misc_SUITE.erl
+++ b/lib/compiler/test/misc_SUITE.erl
@@ -49,15 +49,14 @@
-opaque misc_SUITE_test_cases() :: [atom()].
init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) ->
- Dog = test_server:timetrap(?t:minutes(10)),
- [{watchdog,Dog}|Config].
+ Config.
end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
ok.
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{minutes,10}}].
-spec all() -> misc_SUITE_test_cases().
all() ->
@@ -332,6 +331,9 @@ confused_literals(Config) when is_list(Config) ->
confused_literals_1(int) -> {0,infinity};
confused_literals_1(float) -> {0.0,infinity}.
+integer_encoding() ->
+ [{timetrap,{minutes,4}}].
+
integer_encoding(Config) when is_list(Config) ->
case ?MODULE of
misc_SUITE -> integer_encoding_1(Config);
@@ -339,7 +341,6 @@ integer_encoding(Config) when is_list(Config) ->
end.
integer_encoding_1(Config) ->
- Dog = test_server:timetrap(?t:minutes(4)),
?line PrivDir = ?config(priv_dir, Config),
?line SrcFile = filename:join(PrivDir, "misc_SUITE_integer_encoding.erl"),
?line DataFile = filename:join(PrivDir, "integer_encoding.data"),
@@ -384,7 +385,6 @@ integer_encoding_1(Config) ->
%% Cleanup.
?line file:delete(SrcFile),
?line file:delete(DataFile),
- ?t:timetrap_cancel(Dog),
ok.
do_integer_encoding(0, _, _, _) -> ok;