Skip to content

Commit 7576967

Browse files
committed
Run cluster test only if FF is enabled
1 parent 1afb064 commit 7576967

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

deps/rabbit/test/amqp_connection_uniqueness_SUITE.erl

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
-import(rabbit_amqp_util,
2222
[has_capability/2]).
2323

24-
-import(rabbit_ct_broker_helpers, [rpc/5]).
24+
-import(rabbit_ct_broker_helpers,
25+
[rpc/5,
26+
rpc_all/4]).
2527

2628
all() ->
2729
[
@@ -48,20 +50,9 @@ all_tests() ->
4850
close_existing_conflict_different_user_should_be_refused
4951
].
5052

51-
init_per_suite(Config) ->
52-
case rabbit_ct_helpers:is_mixed_versions() of
53-
true ->
54-
{skip, "mixed version clusters are not supported"};
55-
_ ->
56-
{ok, _} = application:ensure_all_started(amqp10_client),
57-
rabbit_ct_helpers:log_environment(),
58-
Config
59-
end.
60-
61-
end_per_suite(Config) ->
62-
Config.
63-
6453
init_per_group(Group, Config) ->
54+
{ok, _} = application:ensure_all_started(amqp10_client),
55+
rabbit_ct_helpers:log_environment(),
6556
Nodes = case Group of
6657
cluster_size_3 -> 3;
6758
_ -> 1
@@ -74,9 +65,24 @@ init_per_group(Group, Config) ->
7465
Config1,
7566
rabbit_ct_broker_helpers:setup_steps() ++
7667
rabbit_ct_client_helpers:setup_steps()),
77-
Config2.
68+
case Nodes > 1 of
69+
true ->
70+
case rpc(Config2, 0, rabbit_feature_flags,
71+
enable, ['rabbitmq_4.4.0']) of
72+
ok ->
73+
Config2;
74+
_ ->
75+
tear_down_cluster(Config2),
76+
{skip, "sole conn feature not available cluster-wide"}
77+
end;
78+
_ ->
79+
Config2
80+
end.
7881

7982
end_per_group(_, Config) ->
83+
tear_down_cluster(Config).
84+
85+
tear_down_cluster(Config) ->
8086
rabbit_ct_helpers:run_teardown_steps(
8187
Config,
8288
rabbit_ct_client_helpers:teardown_steps() ++

0 commit comments

Comments
 (0)