diff options
author | Siri Hansen <[email protected]> | 2013-01-09 08:51:12 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-01-09 08:51:12 +0100 |
commit | 151f7832c74975297b1dce6302dd192285d7c2a8 (patch) | |
tree | 3fc10ca9a6c0ef9be212c5bb3e650b865d260abb /lib/tools/src | |
parent | 9767e72b44ebd0cd5277634c4a37318479623c2d (diff) | |
parent | 06ad426384ab6c5f5966c4f5ae87be0fb01f346c (diff) | |
download | otp-151f7832c74975297b1dce6302dd192285d7c2a8.tar.gz otp-151f7832c74975297b1dce6302dd192285d7c2a8.tar.bz2 otp-151f7832c74975297b1dce6302dd192285d7c2a8.zip |
Merge branch 'siri/cover/new-bugs-r16/OTP-10638'
* siri/cover/new-bugs-r16/OTP-10638:
[cover] Cleanup by stopping cover between tests
[common_test] Stop cover on slave node after node is terminated
[test_server] Stop cover on node after node is terminated
[cover] Fix timing dependent bug in cover_SUITE:reconnect
[cover] Remove stopped node also from lost_nodes list
[cover] Don't mark stopped node as lost
Diffstat (limited to 'lib/tools/src')
-rw-r--r-- | lib/tools/src/cover.erl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 5a908174d7..ab29d156aa 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -705,7 +705,9 @@ main_process_loop(State) -> remote_collect('_',Nodes,true), reply(From, ok), Nodes1 = State#main_state.nodes--Nodes, - main_process_loop(State#main_state{nodes=Nodes1}); + LostNodes1 = State#main_state.lost_nodes--Nodes, + main_process_loop(State#main_state{nodes=Nodes1, + lost_nodes=LostNodes1}); {From, {flush,Nodes}} -> remote_collect('_',Nodes,false), @@ -792,8 +794,15 @@ main_process_loop(State) -> {'DOWN', _MRef, process, {?SERVER,Node}, _Info} -> %% A remote cover_server is down, mark as lost - Nodes = State#main_state.nodes--[Node], - Lost = [Node|State#main_state.lost_nodes], + {Nodes,Lost} = + case lists:member(Node,State#main_state.nodes) of + true -> + N = State#main_state.nodes--[Node], + L = [Node|State#main_state.lost_nodes], + {N,L}; + false -> % node stopped + {State#main_state.nodes,State#main_state.lost_nodes} + end, main_process_loop(State#main_state{nodes=Nodes,lost_nodes=Lost}); {nodeup,Node} -> |