summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniil Fedotov <dfedotov@pivotal.io>2017-07-28 10:33:37 +0100
committerDaniil Fedotov <dfedotov@pivotal.io>2017-07-31 12:18:00 +0100
commit7db2b7f7310248f229d91ccd31fa583c254bc380 (patch)
tree6b9915fe4cfd323d5d89262f620f016fb9e7f82f /test
parent4f6574b258168b26775e7764ca23de2eee32bc85 (diff)
downloadrabbitmq-server-git-7db2b7f7310248f229d91ccd31fa583c254bc380.tar.gz
Test that a queue master do not fail when adding a dead-vhost node
Diffstat (limited to 'test')
-rw-r--r--test/dynamic_ha_SUITE.erl19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/dynamic_ha_SUITE.erl b/test/dynamic_ha_SUITE.erl
index b2f212fe75..55979e243a 100644
--- a/test/dynamic_ha_SUITE.erl
+++ b/test/dynamic_ha_SUITE.erl
@@ -57,13 +57,15 @@ groups() ->
{clustered, [], [
{cluster_size_2, [], [
vhost_deletion,
- promote_on_shutdown
+ promote_on_shutdown,
+ queue_survive_adding_dead_vhost_mirror
]},
{cluster_size_3, [], [
change_policy,
rapid_change,
nodes_policy_should_pick_master_from_its_params,
- promote_slave_after_standalone_restart
+ promote_slave_after_standalone_restart,
+ queue_survive_adding_dead_vhost_mirror
% FIXME: Re-enable those tests when the know issues are
% fixed.
% failing_random_policies,
@@ -218,6 +220,19 @@ rapid_loop(Config, Node, MRef) ->
rapid_loop(Config, Node, MRef)
end.
+queue_survive_adding_dead_vhost_mirror(Config) ->
+ rabbit_ct_broker_helpers:force_vhost_failure(Config, 1, <<"/">>),
+ NodeA = rabbit_ct_broker_helpers:get_node_config(Config, 0, nodename),
+ ChA = rabbit_ct_client_helpers:open_channel(Config, NodeA),
+ QName = <<"queue_survive_adding_dead_vhost_mirror-q-1">>,
+ amqp_channel:call(ChA, #'queue.declare'{queue = QName}),
+ Q = find_queue(QName, NodeA),
+ Pid = proplists:get_value(pid, Q),
+ rabbit_ct_broker_helpers:set_ha_policy_all(Config),
+ %% Queue should not fail
+ Q1 = find_queue(QName, NodeA),
+ Pid = proplists:get_value(pid, Q1).
+
%% Vhost deletion needs to successfully tear down policies and queues
%% with policies. At least smoke-test that it doesn't blow up.
vhost_deletion(Config) ->