aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/lcnt_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-06 19:46:34 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-07 12:10:13 +0200
commit8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7 (patch)
treedb703599c096483483796be01982d5a1bf75c072 /lib/tools/test/lcnt_SUITE.erl
parent146dfa9ddc3b31649ef581d65f3cb00ef95af10f (diff)
downloadotp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.tar.gz
otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.tar.bz2
otp-8ccea1c2c756d8bc548ee6ba3e10f5a583aca7e7.zip
Modernize use of timetraps
Diffstat (limited to 'lib/tools/test/lcnt_SUITE.erl')
-rw-r--r--lib/tools/test/lcnt_SUITE.erl52
1 files changed, 12 insertions, 40 deletions
diff --git a/lib/tools/test/lcnt_SUITE.erl b/lib/tools/test/lcnt_SUITE.erl
index 47b8031bee..7917dedb49 100644
--- a/lib/tools/test/lcnt_SUITE.erl
+++ b/lib/tools/test/lcnt_SUITE.erl
@@ -22,47 +22,28 @@
-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([init_per_suite/1, end_per_suite/1]).
+-export([all/0, suite/0]).
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases
--export([
- t_load/1,
- t_conflicts/1,
- t_locations/1,
- t_swap_keys/1
- ]).
-
-%% Default timetrap timeout (set in init_per_testcase)
--define(default_timeout, ?t:minutes(4)).
-
-init_per_suite(Config) when is_list(Config) ->
- Config.
-
-end_per_suite(Config) when is_list(Config) ->
- Config.
+-export([t_load/1,
+ t_conflicts/1,
+ t_locations/1,
+ t_swap_keys/1]).
init_per_testcase(_Case, Config) ->
- Dog = ?t:timetrap(?default_timeout),
- [{watchdog,Dog} | Config].
+ Config.
-end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
+end_per_testcase(_Case, _Config) ->
catch lcnt:stop(),
ok.
-suite() -> [{ct_hooks,[ts_install_cth]}].
-
-all() -> [t_load, t_conflicts, t_locations, t_swap_keys].
-
-groups() -> [].
-
-init_per_group(_GroupName, Config) -> Config.
-
-end_per_group(_GroupName, Config) -> Config.
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{minutes,4}}].
+all() ->
+ [t_load, t_conflicts, t_locations, t_swap_keys].
%%----------------------------------------------------------------------
%% Tests
@@ -169,12 +150,3 @@ t_swap_keys_file([File|Files]) ->
ok = lcnt:conflicts(),
ok = lcnt:stop(),
t_swap_keys_file(Files).
-
-
-%%----------------------------------------------------------------------
-%% Auxiliary tests
-%%----------------------------------------------------------------------
-
-%%----------------------------------------------------------------------
-%% Auxiliary
-%%----------------------------------------------------------------------