|
7 | 7 | -module(dynamic_qq_SUITE).
|
8 | 8 |
|
9 | 9 | -include_lib("common_test/include/ct.hrl").
|
10 |
| --include_lib("proper/include/proper.hrl"). |
11 | 10 | -include_lib("eunit/include/eunit.hrl").
|
12 | 11 | -include_lib("amqp_client/include/amqp_client.hrl").
|
13 | 12 |
|
14 | 13 | -import(quorum_queue_utils, [wait_for_messages_ready/3,
|
15 | 14 | ra_name/1]).
|
16 | 15 |
|
| 16 | +-compile(nowarn_export_all). |
17 | 17 | -compile(export_all).
|
18 | 18 |
|
19 | 19 | all() ->
|
@@ -57,27 +57,33 @@ end_per_group(_, Config) ->
|
57 | 57 | Config.
|
58 | 58 |
|
59 | 59 | 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 |
81 | 87 | end.
|
82 | 88 |
|
83 | 89 | end_per_testcase(Testcase, Config) ->
|
@@ -246,3 +252,7 @@ recover_follower_after_standalone_restart(Config) ->
|
246 | 252 | forget_cluster_node(Config, Node, NodeToRemove) ->
|
247 | 253 | rabbit_ct_broker_helpers:rabbitmqctl(
|
248 | 254 | Config, Node, ["forget_cluster_node", "--offline", NodeToRemove]).
|
| 255 | + |
| 256 | + |
| 257 | +is_mixed_versions() -> |
| 258 | + not (false == os:getenv("SECONDARY_UMBRELLA")). |
0 commit comments