diff options
| author | Michael Klishin <michael@novemberain.com> | 2017-08-10 02:57:55 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-10 02:57:55 +0300 |
| commit | ec5ffe7296fbb883dccb35802d4bbcf8f2473e0d (patch) | |
| tree | 347c86ac2f8170e2750698530cf6c0b4a51673b4 /test | |
| parent | 2a01b6c6d18c2f29abbfa5fbf88d5de1ac9c43c3 (diff) | |
| parent | af397dd1b42eaf44f7213f847fed6c0135812e20 (diff) | |
| download | rabbitmq-server-git-ec5ffe7296fbb883dccb35802d4bbcf8f2473e0d.tar.gz | |
Merge pull request #1325 from rabbitmq/rabbitmq-server-1323
Clean up orphaned exclusive queues
Diffstat (limited to 'test')
| -rw-r--r-- | test/simple_ha_SUITE.erl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/simple_ha_SUITE.erl b/test/simple_ha_SUITE.erl index b655c1c8cf..25d8a304e6 100644 --- a/test/simple_ha_SUITE.erl +++ b/test/simple_ha_SUITE.erl @@ -31,7 +31,8 @@ groups() -> [ {cluster_size_2, [], [ rapid_redeclare, - declare_synchrony + declare_synchrony, + clean_up_exclusive_queues ]}, {cluster_size_3, [], [ consume_survives_stop, @@ -125,6 +126,21 @@ declare_synchrony(Config) -> declare(Ch, Name) -> amqp_channel:call(Ch, #'queue.declare'{durable = true, queue = Name}). +%% Ensure that exclusive queues are cleaned up when part of ha cluster +%% and node is killed abruptly then restarted +clean_up_exclusive_queues(Config) -> + QName = <<"excl">>, + rabbit_ct_broker_helpers:set_ha_policy(Config, 0, <<".*">>, <<"all">>), + [A, B] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename), + ChA = rabbit_ct_client_helpers:open_channel(Config, A), + amqp_channel:call(ChA, #'queue.declare'{queue = QName, + exclusive = true}), + ok = rabbit_ct_broker_helpers:kill_node(Config, A), + [] = rabbit_ct_broker_helpers:rpc(Config, B, rabbit_amqqueue, list, []), + ok = rabbit_ct_broker_helpers:start_node(Config, A), + [[],[]] = rabbit_ct_broker_helpers:rpc_all(Config, rabbit_amqqueue, list, []), + ok. + consume_survives_stop(Cf) -> consume_survives(Cf, fun stop/2, true). consume_survives_sigkill(Cf) -> consume_survives(Cf, fun sigkill/2, true). consume_survives_policy(Cf) -> consume_survives(Cf, fun policy/2, true). |
