Skip to content

Commit 439ff4a

Browse files
committed
definition_import_SUITE: Skip import_case13 if quorum_queues are unsupported
We need this because the testcase fails in a mixed-version cluster situation if the other node does not support quorum queues. (cherry picked from commit ddd40d8)
1 parent 5dac11f commit 439ff4a

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

test/definition_import_SUITE.erl

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,29 @@ import_case11(Config) -> import_file_case(Config, "case11").
121121
import_case12(Config) -> import_invalid_file_case(Config, "failing_case12").
122122

123123
import_case13(Config) ->
124-
import_file_case(Config, "case13"),
125-
VHost = <<"/">>,
126-
QueueName = <<"definitions.import.case13.qq.1">>,
127-
QueueIsImported = fun () ->
128-
case queue_lookup(Config, VHost, QueueName) of
129-
{ok, _} -> true;
130-
_ -> false
131-
end
132-
end,
133-
rabbit_ct_helpers:await_condition(QueueIsImported, 20000),
134-
{ok, Q} = queue_lookup(Config, VHost, QueueName),
135-
136-
%% see rabbitmq/rabbitmq-server#2400, rabbitmq/rabbitmq-server#2426
137-
?assert(amqqueue:is_quorum(Q)),
138-
?assertEqual([{<<"x-max-length">>, long, 991},
139-
{<<"x-queue-type">>, longstr, <<"quorum">>}],
140-
amqqueue:get_arguments(Q)).
124+
case rabbit_ct_broker_helpers:enable_feature_flag(Config, quorum_queue) of
125+
ok ->
126+
import_file_case(Config, "case13"),
127+
VHost = <<"/">>,
128+
QueueName = <<"definitions.import.case13.qq.1">>,
129+
QueueIsImported =
130+
fun () ->
131+
case queue_lookup(Config, VHost, QueueName) of
132+
{ok, _} -> true;
133+
_ -> false
134+
end
135+
end,
136+
rabbit_ct_helpers:await_condition(QueueIsImported, 20000),
137+
{ok, Q} = queue_lookup(Config, VHost, QueueName),
138+
139+
%% see rabbitmq/rabbitmq-server#2400, rabbitmq/rabbitmq-server#2426
140+
?assert(amqqueue:is_quorum(Q)),
141+
?assertEqual([{<<"x-max-length">>, long, 991},
142+
{<<"x-queue-type">>, longstr, <<"quorum">>}],
143+
amqqueue:get_arguments(Q));
144+
Skip ->
145+
Skip
146+
end.
141147

142148
export_import_round_trip_case1(Config) ->
143149
%% case 6 has runtime parameters that do not depend on any plugins

0 commit comments

Comments
 (0)