aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/register_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-03-15 10:41:06 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-03-15 10:41:06 +0100
commitbbfc76f64897f33ada6d4fd09ab4cfe2966e6b05 (patch)
tree689116eea77a14153f9d68f358abb603bb73ff22 /erts/emulator/test/register_SUITE.erl
parentf6711a886eb606d63f4c9c21935f43aea2aabb0a (diff)
parent61167468c2bedd4b6832662145272dc3f94805d4 (diff)
downloadotp-bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05.tar.gz
otp-bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05.tar.bz2
otp-bbfc76f64897f33ada6d4fd09ab4cfe2966e6b05.zip
Merge branch 'egil/modernize-erts-tests'
* egil/modernize-erts-tests: Tweak bs_construct_SUITE Tweak port_SUITE Fix module_info_SUITE Fix send_term_SUITE Cleaner map_SUITE Remove ?line macros Eliminate use of doc and suite clauses Replace ?t with test_server Eliminate use of ?config() macro Replace use of test_server:format/2 with io:format/2 Eliminate use of test_server:fail/0,1 Modernize use of timetraps
Diffstat (limited to 'erts/emulator/test/register_SUITE.erl')
-rw-r--r--erts/emulator/test/register_SUITE.erl60
1 files changed, 14 insertions, 46 deletions
diff --git a/erts/emulator/test/register_SUITE.erl b/erts/emulator/test/register_SUITE.erl
index 53bf02e085..ad8a9c29f3 100644
--- a/erts/emulator/test/register_SUITE.erl
+++ b/erts/emulator/test/register_SUITE.erl
@@ -26,44 +26,17 @@
-include_lib("common_test/include/ct.hrl").
%-compile(export_all).
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,
- init_per_testcase/2, end_per_testcase/2]).
+-export([all/0, suite/0]).
-export([otp_8099/1]).
--define(DEFAULT_TIMEOUT, ?t:minutes(2)).
-
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap, {minutes, 2}}].
all() ->
[otp_8099].
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-
-init_per_testcase(Case, Config) when is_list(Config) ->
- Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
- [{watchdog, Dog}, {testcase, Case} | Config].
-
-end_per_testcase(_Case, Config) when is_list(Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
- ok.
-
%%
%% Test cases
%%
@@ -83,25 +56,20 @@ otp_8099(Config) when is_list(Config) ->
otp_8099_test(0) ->
ok;
otp_8099_test(N) ->
- ?line P = spawn(fun () -> otp_8099_proc() end),
- ?line case catch register(?OTP_8099_NAME, P) of
+ P = spawn(fun () -> otp_8099_proc() end),
+ case catch register(?OTP_8099_NAME, P) of
true ->
- ?line ok;
+ ok;
_ ->
- ?line OP = whereis(?OTP_8099_NAME),
- ?line (catch unregister(?OTP_8099_NAME)),
- ?line (catch exit(OP, kill)),
- ?line true = (catch register(?OTP_8099_NAME, P))
+ OP = whereis(?OTP_8099_NAME),
+ (catch unregister(?OTP_8099_NAME)),
+ (catch exit(OP, kill)),
+ true = (catch register(?OTP_8099_NAME, P))
end,
- ?line P = whereis(?OTP_8099_NAME),
- ?line exit(P, kill),
- ?line otp_8099_test(N-1).
+ P = whereis(?OTP_8099_NAME),
+ exit(P, kill),
+ otp_8099_test(N-1).
otp_8099_proc() ->
receive _ -> ok end,
otp_8099_proc().
-
-%%
-%% Utils
-%%
-