aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test_server/test')
-rw-r--r--lib/test_server/test/test_server_test_lib.erl19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/test_server/test/test_server_test_lib.erl b/lib/test_server/test/test_server_test_lib.erl
index 4e89abf308..d466aa0110 100644
--- a/lib/test_server/test/test_server_test_lib.erl
+++ b/lib/test_server/test/test_server_test_lib.erl
@@ -83,14 +83,21 @@ start_slave(Config,_Level) ->
post_end_per_testcase(_TC, Config, Return, State) ->
Node = proplists:get_value(node, Config),
- case test_server:is_cover() of
- true ->
- cover:flush(Node);
- false ->
- ok
+ Cover = test_server:is_cover(),
+ if Cover-> cover:flush(Node);
+ true -> ok
end,
+ erlang:monitor_node(Node, true),
slave:stop(Node),
-
+ receive
+ {nodedown, Node} ->
+ if Cover -> cover:stop(Node);
+ true -> ok
+ end
+ after 5000 ->
+ erlang:monitor_node(Node, false),
+ receive {nodedown, Node} -> ok after 0 -> ok end %flush
+ end,
{Return, State}.
%% Parse an .suite log file