diff options
author | Björn Gustavsson <[email protected]> | 2016-02-26 06:47:38 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-09 12:05:19 +0100 |
commit | db87ef023f4660fd2129f30dbbff05e73bff3dd5 (patch) | |
tree | b97030bda2efea02fc58e5f0eaebd1450bb00d82 /lib/stdlib/test/gen_server_SUITE.erl | |
parent | aeccfd1c8441ac0caa0c86aac19747eb64bd267d (diff) | |
download | otp-db87ef023f4660fd2129f30dbbff05e73bff3dd5.tar.gz otp-db87ef023f4660fd2129f30dbbff05e73bff3dd5.tar.bz2 otp-db87ef023f4660fd2129f30dbbff05e73bff3dd5.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/stdlib/test/gen_server_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/gen_server_SUITE.erl | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl index 634d868ad4..2307d823bf 100644 --- a/lib/stdlib/test/gen_server_SUITE.erl +++ b/lib/stdlib/test/gen_server_SUITE.erl @@ -52,7 +52,9 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, format_status/2]). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> [start, {group,stop}, crash, call, cast, cast_fast, info, abcast, @@ -83,8 +85,6 @@ end_per_group(_GroupName, Config) -> Config. --define(default_timeout, ?t:minutes(1)). - init_per_testcase(Case, Config) when Case == call_remote1; Case == call_remote2; Case == call_remote3; @@ -92,11 +92,10 @@ init_per_testcase(Case, Config) when Case == call_remote1; Case == call_remote_n2; Case == call_remote_n3 -> {ok,N} = start_node(hubba), - ?line Dog = ?t:timetrap(?default_timeout), - [{node,N},{watchdog, Dog} | Config]; + [{node,N} | Config]; init_per_testcase(_Case, Config) -> - ?line Dog = ?t:timetrap(?default_timeout), - [{watchdog, Dog} | Config]. + Config. + end_per_testcase(_Case, Config) -> case proplists:get_value(node, Config) of undefined -> @@ -104,8 +103,6 @@ end_per_testcase(_Case, Config) -> N -> test_server:stop_node(N) end, - Dog = ?config(watchdog, Config), - test_server:timetrap_cancel(Dog), ok. |