Skip to content

Commit c2eb78b

Browse files
committed
Enable a post-#4563 test
When a non-mirrored durable classic queue is hosted on a node that goes down, prior to #4563 not only was the behaviour that the queue gets deleted from the rabbit_queue table, but also that its corresponding bindings get deleted. The purpose of this test was to make sure that bindings get also properly deleted from the new rabbit_index_route table. Given that the behaviour now changed #4563 we can either delete this test or - as done in this commit - adapt this test. (cherry picked from commit 23e7fc8)
1 parent 807ad39 commit c2eb78b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

deps/rabbit/test/direct_exchange_routing_v2_SUITE.erl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ groups() ->
4545
]},
4646
{cluster_size_2, [],
4747
[{start_feature_flag_enabled, [], [
48-
remove_binding_node_down_transient_queue
49-
%% , remove_binding_node_down_durable_queue
48+
remove_binding_node_down_transient_queue,
49+
keep_binding_node_down_durable_queue
5050
]},
5151
{start_feature_flag_disabled, [], [enable_feature_flag_during_definition_import]}
5252
]},
@@ -285,7 +285,7 @@ remove_binding_node_down_transient_queue(Config) ->
285285
delete_queue(Ch1, Q),
286286
ok.
287287

288-
remove_binding_node_down_durable_queue(Config) ->
288+
keep_binding_node_down_durable_queue(Config) ->
289289
[_Server1, Server2] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
290290
{_Conn1, Ch1} = rabbit_ct_client_helpers:open_connection_and_channel(Config, 0),
291291
{_Conn2, Ch2} = rabbit_ct_client_helpers:open_connection_and_channel(Config, 1),
@@ -305,10 +305,11 @@ remove_binding_node_down_durable_queue(Config) ->
305305
assert_confirm(),
306306

307307
rabbit_control_helper:command(stop_app, Server2),
308-
%% We expect no route to durable classic queue when its host node is down.
309-
assert_index_table_empty(Config),
308+
%% When the durable classic queue's host node is down,
309+
%% we expect that queue and its bindings still to exist
310+
%% (see https://github.com/rabbitmq/rabbitmq-server/pull/4563).
311+
assert_index_table_non_empty(Config),
310312
rabbit_control_helper:command(start_app, Server2),
311-
%% We expect route to come back when durable queue's host node comes back.
312313
assert_index_table_non_empty(Config),
313314
delete_queue(Ch1, Q),
314315
ok.

0 commit comments

Comments
 (0)