summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-02-17 16:53:22 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-02-17 16:53:22 +0000
commit5850679bbfae610ef664cbe8cdd6f3b98c9d9fd3 (patch)
tree065a6738affa45cc26bb9defdbd38a60660b6515
parentb1913648c6a56a3db00f05caa81324c81c8d1194 (diff)
downloadrabbitmq-server-git-5850679bbfae610ef664cbe8cdd6f3b98c9d9fd3.tar.gz
How do I hate thee, coverage? Let me count the ways.
Now that ctl reset disconnects us from the distributed system, it breaks coverage each time we do it. Fix all that up again.
-rw-r--r--src/rabbit_tests.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 58286b0c6e..433ed9cb59 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -71,10 +71,13 @@ maybe_run_cluster_dependent_tests() ->
run_cluster_dependent_tests(SecondaryNode) ->
SecondaryNodeS = atom_to_list(SecondaryNode),
+ cover:stop(SecondaryNode),
ok = control_action(stop_app, []),
ok = control_action(reset, []),
ok = control_action(cluster, [SecondaryNodeS]),
ok = control_action(start_app, []),
+ cover:start(SecondaryNode),
+ ok = control_action(start_app, SecondaryNode, [], []),
io:format("Running cluster dependent tests with node ~p~n", [SecondaryNode]),
passed = test_delegates_async(SecondaryNode),
@@ -960,7 +963,9 @@ test_cluster_management2(SecondaryNode) ->
ok = control_action(cluster, [SecondaryNodeS, NodeS]),
ok = control_action(start_app, []),
ok = control_action(stop_app, []),
+ cover:stop(SecondaryNode),
ok = control_action(reset, []),
+ cover:start(SecondaryNode),
%% attempt to leave cluster when no other node is alive
ok = control_action(cluster, [SecondaryNodeS, NodeS]),
@@ -982,8 +987,10 @@ test_cluster_management2(SecondaryNode) ->
%% we will get disconnected half way through causing a
%% badrpc. This never happens in real life since rabbitmqctl is
%% not a clustered Mnesia node.
+ cover:stop(SecondaryNode),
{badrpc, nodedown} = control_action(force_reset, SecondaryNode, [], []),
pong = net_adm:ping(SecondaryNode),
+ cover:start(SecondaryNode),
ok = control_action(cluster, SecondaryNode, [NodeS], []),
ok = control_action(start_app, SecondaryNode, [], []),