From 1553773f77af13e4c8309dea1538ddd4c47b7c5e Mon Sep 17 00:00:00 2001 From: Zandra Hird Date: Fri, 10 Jun 2016 14:58:24 +0200 Subject: kernel: Make sure loose test node is stopped before next test case --- lib/kernel/test/loose_node.erl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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). -- cgit v1.2.3