aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/ets_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-26 06:47:38 +0100
committerBjörn Gustavsson <[email protected]>2016-03-09 12:05:19 +0100
commitdb87ef023f4660fd2129f30dbbff05e73bff3dd5 (patch)
treeb97030bda2efea02fc58e5f0eaebd1450bb00d82 /lib/stdlib/test/ets_SUITE.erl
parentaeccfd1c8441ac0caa0c86aac19747eb64bd267d (diff)
downloadotp-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/ets_SUITE.erl')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl19
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 6f9be9b179..19e2acac93 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -116,19 +116,18 @@ init_per_testcase(Case, Config) ->
io:format("*** SEED: ~p ***\n", [rand:export_seed()]),
start_spawn_logger(),
wait_for_test_procs(), %% Ensure previous case cleaned up
- Dog=test_server:timetrap(test_server:minutes(20)),
put('__ETS_TEST_CASE__', Case),
- [{watchdog, Dog}, {test_case, Case} | Config].
+ [{test_case, Case} | Config].
-end_per_testcase(_Func, Config) ->
- Dog=?config(watchdog, Config),
- wait_for_test_procs(true),
- test_server:timetrap_cancel(Dog).
+end_per_testcase(_Func, _Config) ->
+ wait_for_test_procs(true).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{minutes,20}}].
all() ->
[{group, new}, {group, insert}, {group, lookup},
@@ -1308,13 +1307,9 @@ match_heavy(Config) when is_list(Config) ->
%% running the test function.
put(where_to_read,DataDir),
put(where_to_write,PrivDir),
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
- NewDog=test_server:timetrap(test_server:seconds(1000)),
- NewConfig = [{watchdog, NewDog} | lists:keydelete(watchdog,1,Config)],
random_test(),
drop_match(),
- NewConfig.
+ ok.
%%% Extra safety for the very low probability that this is not
%%% caught by the random test (Statistically impossible???)