diff options
-rw-r--r-- | lib/kernel/test/gen_udp_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/kernel/test/loose_node.erl | 11 |
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). |