aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/monitor_SUITE.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-06-10 09:47:24 +0200
committerLukas Larsson <[email protected]>2016-06-10 09:47:24 +0200
commit7979f72ce15ec5eeb8e0e9cfc1c291f10c4f0432 (patch)
tree582f90aac92b208b3fbf20c2f50bb588e28a6f53 /erts/emulator/test/monitor_SUITE.erl
parent77e69343b8bf6de63242cbcea7ebb35be3bb99e9 (diff)
parent3ee5343415d6ae0ce1ff1c2a2555051431a9315e (diff)
downloadotp-7979f72ce15ec5eeb8e0e9cfc1c291f10c4f0432.tar.gz
otp-7979f72ce15ec5eeb8e0e9cfc1c291f10c4f0432.tar.bz2
otp-7979f72ce15ec5eeb8e0e9cfc1c291f10c4f0432.zip
Merge branch 'kvakvs/erts/monitor_port/OTP-11384'
* kvakvs/erts/monitor_port/OTP-11384: erts: Add port monitors
Diffstat (limited to 'erts/emulator/test/monitor_SUITE.erl')
-rw-r--r--erts/emulator/test/monitor_SUITE.erl12
1 files changed, 7 insertions, 5 deletions
diff --git a/erts/emulator/test/monitor_SUITE.erl b/erts/emulator/test/monitor_SUITE.erl
index 8955e62df5..90d2bd8c5d 100644
--- a/erts/emulator/test/monitor_SUITE.erl
+++ b/erts/emulator/test/monitor_SUITE.erl
@@ -21,6 +21,7 @@
-module(monitor_SUITE).
-include_lib("common_test/include/ct.hrl").
+-include_lib("eunit/include/eunit.hrl").
-export([all/0, suite/0, groups/0,
case_1/1, case_1a/1, case_2/1, case_2a/1, mon_e_1/1, demon_e_1/1, demon_1/1,
@@ -706,7 +707,7 @@ named_down(Config) when is_list(Config) ->
spawn_opt(fun () ->
WFun = fun
(F, hej) -> F(F, hopp);
-(F, hopp) -> F(F, hej)
+ (F, hopp) -> F(F, hej)
end,
NoSchedulers = erlang:system_info(schedulers_online),
lists:foreach(fun (_) ->
@@ -726,13 +727,14 @@ named_down(Config) when is_list(Config) ->
NamedProc = spawn_link(fun () ->
receive after infinity -> ok end
end),
- true = register(Name, NamedProc),
+ ?assertEqual(true, register(Name, NamedProc)),
unlink(NamedProc),
exit(NamedProc, bang),
Mon = erlang:monitor(process, Name),
- receive {'DOWN',Mon, _, _, _} -> ok end,
- true = register(Name, self()),
- true = unregister(Name),
+ receive {'DOWN',Mon, _, _, bang} -> ok
+ after 3000 -> ?assert(false) end,
+ ?assertEqual(true, register(Name, self())),
+ ?assertEqual(true, unregister(Name)),
process_flag(priority,Prio),
ok.