diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-02-17 16:53:22 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-02-17 16:53:22 +0000 |
commit | 77c93c17ff4a581f93d662b08170cc6bf1dd9efa (patch) | |
tree | 065a6738affa45cc26bb9defdbd38a60660b6515 | |
parent | d55e220afa053fed275804748bd01ae0e3d2c19b (diff) | |
download | rabbitmq-server-bug24365.tar.gz |
How do I hate thee, coverage? Let me count the ways.bug24365
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.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 58286b0c..433ed9cb 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, [], []), |