Skip to content

Commit 73c55c3

Browse files
committed
Ignore dynamic_qq test that isn't mixed version compatible
cherry picked from 8a4f4c6 quorum_unaffected_after_vhost_failure isn't mixed versions compatible as it tries to declare a queue in a mixed cluster from a node running RA 1.x where all other nodes are running Ra 2.0.
1 parent 0ec7c70 commit 73c55c3

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

deps/rabbit/test/dynamic_qq_SUITE.erl

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
-module(dynamic_qq_SUITE).
88

99
-include_lib("common_test/include/ct.hrl").
10-
-include_lib("proper/include/proper.hrl").
1110
-include_lib("eunit/include/eunit.hrl").
1211
-include_lib("amqp_client/include/amqp_client.hrl").
1312

1413
-import(quorum_queue_utils, [wait_for_messages_ready/3,
1514
ra_name/1]).
1615

16+
-compile(nowarn_export_all).
1717
-compile(export_all).
1818

1919
all() ->
@@ -57,27 +57,33 @@ end_per_group(_, Config) ->
5757
Config.
5858

5959
init_per_testcase(Testcase, Config) ->
60-
rabbit_ct_helpers:testcase_started(Config, Testcase),
61-
ClusterSize = ?config(rmq_nodes_count, Config),
62-
TestNumber = rabbit_ct_helpers:testcase_number(Config, ?MODULE, Testcase),
63-
Group = proplists:get_value(name, ?config(tc_group_properties, Config)),
64-
Q = rabbit_data_coercion:to_binary(io_lib:format("~p_~p", [Group, Testcase])),
65-
Config1 = rabbit_ct_helpers:set_config(Config, [
66-
{rmq_nodename_suffix, Testcase},
67-
{tcp_ports_base, {skip_n_nodes, TestNumber * ClusterSize}},
68-
{queue_name, Q},
69-
{queue_args, [{<<"x-queue-type">>, longstr, <<"quorum">>}]}
70-
]),
71-
Config2 = rabbit_ct_helpers:run_steps(
72-
Config1,
73-
rabbit_ct_broker_helpers:setup_steps() ++
74-
rabbit_ct_client_helpers:setup_steps()),
75-
case rabbit_ct_broker_helpers:enable_feature_flag(Config2, quorum_queue) of
76-
ok ->
77-
Config2;
78-
Skip ->
79-
end_per_testcase(Testcase, Config2),
80-
Skip
60+
case quorum_queue_utils:is_mixed_versions() andalso
61+
Testcase == quorum_unaffected_after_vhost_failure of
62+
true ->
63+
{skip, "test case not mixed versions compatible"};
64+
false ->
65+
rabbit_ct_helpers:testcase_started(Config, Testcase),
66+
ClusterSize = ?config(rmq_nodes_count, Config),
67+
TestNumber = rabbit_ct_helpers:testcase_number(Config, ?MODULE, Testcase),
68+
Group = proplists:get_value(name, ?config(tc_group_properties, Config)),
69+
Q = rabbit_data_coercion:to_binary(io_lib:format("~p_~p", [Group, Testcase])),
70+
Config1 = rabbit_ct_helpers:set_config(Config, [
71+
{rmq_nodename_suffix, Testcase},
72+
{tcp_ports_base, {skip_n_nodes, TestNumber * ClusterSize}},
73+
{queue_name, Q},
74+
{queue_args, [{<<"x-queue-type">>, longstr, <<"quorum">>}]}
75+
]),
76+
Config2 = rabbit_ct_helpers:run_steps(
77+
Config1,
78+
rabbit_ct_broker_helpers:setup_steps() ++
79+
rabbit_ct_client_helpers:setup_steps()),
80+
case rabbit_ct_broker_helpers:enable_feature_flag(Config2, quorum_queue) of
81+
ok ->
82+
Config2;
83+
Skip ->
84+
end_per_testcase(Testcase, Config2),
85+
Skip
86+
end
8187
end.
8288

8389
end_per_testcase(Testcase, Config) ->
@@ -246,3 +252,7 @@ recover_follower_after_standalone_restart(Config) ->
246252
forget_cluster_node(Config, Node, NodeToRemove) ->
247253
rabbit_ct_broker_helpers:rabbitmqctl(
248254
Config, Node, ["forget_cluster_node", "--offline", NodeToRemove]).
255+
256+
257+
is_mixed_versions() ->
258+
not (false == os:getenv("SECONDARY_UMBRELLA")).

0 commit comments

Comments
 (0)