aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2016-06-15 12:09:56 +0200
committerZandra Hird <[email protected]>2016-06-15 12:09:56 +0200
commite8a1b6af04fbd9c710ceafbdc2c644f622f7ad85 (patch)
tree21dc36198e426265901083401020380b2101f259 /lib
parente1c29ff08596af72736d68c778398d7f423669d3 (diff)
parentc82c4d6c0d9aea91ac4277a8fc0dcfa60e3e66bc (diff)
downloadotp-e8a1b6af04fbd9c710ceafbdc2c644f622f7ad85.tar.gz
otp-e8a1b6af04fbd9c710ceafbdc2c644f622f7ad85.tar.bz2
otp-e8a1b6af04fbd9c710ceafbdc2c644f622f7ad85.zip
Merge branch 'zandra/kernel-test-cuddle'
* zandra/kernel-test-cuddle: gen_udp_SUITE: Increase timeout to stabilize connect test kernel: Make sure loose test node is stopped before next test case
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/gen_udp_SUITE.erl2
-rw-r--r--lib/kernel/test/loose_node.erl11
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl
index 85dc6312ea..44539bf44c 100644
--- a/lib/kernel/test/gen_udp_SUITE.erl
+++ b/lib/kernel/test/gen_udp_SUITE.erl
@@ -572,7 +572,7 @@ connect(Config) when is_list(Config) ->
ok = gen_udp:close(S1),
ok = gen_udp:connect(S2, Addr, P1),
ok = gen_udp:send(S2, <<16#deadbeef:32>>),
- ok = case gen_udp:recv(S2, 0, 5) of
+ ok = case gen_udp:recv(S2, 0, 500) of
{error,econnrefused} -> ok;
{error,econnreset} -> ok;
Other -> Other
diff --git a/lib/kernel/test/loose_node.erl b/lib/kernel/test/loose_node.erl
index 93530c2735..cc3f9bbea0 100644
--- a/lib/kernel/test/loose_node.erl
+++ b/lib/kernel/test/loose_node.erl
@@ -57,9 +57,16 @@
%%
stop(Node) when is_atom(Node) ->
+ erlang:monitor_node(Node, true),
rpc:cast(Node, erlang, halt, []),
- io:format("Stopped loose node ~p~n", [Node]),
- ok.
+ receive
+ {nodedown, Node} ->
+ io:format("Stopped loose node ~p~n", [Node]),
+ ok
+ after 10000 ->
+ io:format("Failed to stop loose node: ~p~n", [Node]),
+ {error, node_not_stopped}
+ end.
start(Name, Args) ->
start(Name, Args, -1).