Skip to content

Commit 3fd96b5

Browse files
committed
Avoid rabbit_ct_helpers:is_mixed_versions/0
Fixes #10761 (comment) : "Could you please check a real condition that the old version can't be used as part of this test? is_mixed_versions() will still return true in 10 years when testing RabbitMQ 21.x against 22.x. This function should almost never be used."
1 parent 4b95745 commit 3fd96b5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

deps/rabbitmq_web_mqtt/test/command_SUITE.erl

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
-include_lib("eunit/include/eunit.hrl").
1212
-include_lib("amqp_client/include/amqp_client.hrl").
1313
-include_lib("rabbitmq_mqtt/include/rabbit_mqtt.hrl").
14-
-import(rabbit_web_mqtt_test_util, [connect/3, connect/4]).
14+
15+
-import(rabbit_web_mqtt_test_util,
16+
[connect/3, connect/4]).
1517

1618
-define(COMMAND, 'Elixir.RabbitMQ.CLI.Ctl.Commands.ListWebMqttConnectionsCommand').
1719

@@ -53,12 +55,11 @@ end_per_suite(Config) ->
5355

5456
init_per_group(unit, Config) ->
5557
Config;
56-
init_per_group(Group, Config) ->
57-
case rabbit_ct_helpers:is_mixed_versions() of
58-
true ->
59-
{skip, "mixed version clusters are not supported"};
60-
_ ->
61-
rabbit_ct_helpers:set_config(Config, {mqtt_version, Group})
58+
init_per_group(v5 = V5, Config0) ->
59+
Config = rabbit_ct_helpers:set_config(Config0, {mqtt_version, V5}),
60+
case rabbit_ct_broker_helpers:enable_feature_flag(Config, mqtt_v5) of
61+
ok -> Config;
62+
{skip, _} = Skip -> Skip
6263
end.
6364

6465
end_per_group(_, Config) ->

0 commit comments

Comments
 (0)