Skip to content

Commit 4d34c46

Browse files
committed
Run cluster test only if FF is enabled
1 parent e808786 commit 4d34c46

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

deps/rabbit/test/amqp_connection_uniqueness_partitions_SUITE.erl

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
-import(rabbit_amqp_util,
1919
[has_capability/2]).
2020

21-
-import(rabbit_ct_broker_helpers, [rpc/5]).
21+
-import(rabbit_ct_broker_helpers,
22+
[enable_feature_flag/2,
23+
rpc/5]).
2224

2325
-define(SOLE_CONN_MOD, rabbit_amqp_sole_conn).
2426
-define(NODE_COUNT, 3).
@@ -46,19 +48,32 @@ end_per_suite(Config) ->
4648
Config.
4749

4850
init_per_group(cluster, Config) ->
51+
{ok, _} = application:ensure_all_started(amqp10_client),
52+
rabbit_ct_helpers:log_environment(),
4953
Suffix = rabbit_ct_helpers:testcase_absname(Config, "", "-"),
5054
Config1 = rabbit_ct_helpers:set_config(
5155
Config, [{rmq_nodes_count, ?NODE_COUNT},
5256
{rmq_nodes_clustered, true},
5357
{rmq_nodename_suffix, Suffix},
5458
{net_ticktime, ?NET_TICKTIME_S}]),
55-
rabbit_ct_helpers:run_setup_steps(
56-
Config1,
57-
[fun rabbit_ct_broker_helpers:configure_dist_proxy/1] ++
58-
rabbit_ct_broker_helpers:setup_steps() ++
59-
rabbit_ct_client_helpers:setup_steps()).
59+
Config2 = rabbit_ct_helpers:run_setup_steps(
60+
Config1,
61+
[fun rabbit_ct_broker_helpers:configure_dist_proxy/1] ++
62+
rabbit_ct_broker_helpers:setup_steps() ++
63+
rabbit_ct_client_helpers:setup_steps()),
64+
65+
case enable_feature_flag(Config2, 'rabbitmq_4.4.0') of
66+
ok ->
67+
Config2;
68+
_ ->
69+
tear_down_cluster(Config2),
70+
{skip, "sole conn feature not available cluster-wide"}
71+
end.
6072

6173
end_per_group(_, Config) ->
74+
tear_down_cluster(Config).
75+
76+
tear_down_cluster(Config) ->
6277
rabbit_ct_helpers:run_teardown_steps(
6378
Config,
6479
rabbit_ct_client_helpers:teardown_steps() ++

0 commit comments

Comments
 (0)