Skip to content

Commit

Permalink
Avoid rabbit_ct_helpers:is_mixed_versions/0
Browse files Browse the repository at this point in the history
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."
  • Loading branch information
ansd committed Mar 21, 2024
1 parent 4b95745 commit 3fd96b5
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions deps/rabbitmq_web_mqtt/test/command_SUITE.erl
Expand Up @@ -11,7 +11,9 @@
-include_lib("eunit/include/eunit.hrl").
-include_lib("amqp_client/include/amqp_client.hrl").
-include_lib("rabbitmq_mqtt/include/rabbit_mqtt.hrl").
-import(rabbit_web_mqtt_test_util, [connect/3, connect/4]).

-import(rabbit_web_mqtt_test_util,
[connect/3, connect/4]).

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

Expand Down Expand Up @@ -53,12 +55,11 @@ end_per_suite(Config) ->

init_per_group(unit, Config) ->
Config;
init_per_group(Group, Config) ->
case rabbit_ct_helpers:is_mixed_versions() of
true ->
{skip, "mixed version clusters are not supported"};
_ ->
rabbit_ct_helpers:set_config(Config, {mqtt_version, Group})
init_per_group(v5 = V5, Config0) ->
Config = rabbit_ct_helpers:set_config(Config0, {mqtt_version, V5}),
case rabbit_ct_broker_helpers:enable_feature_flag(Config, mqtt_v5) of
ok -> Config;
{skip, _} = Skip -> Skip
end.

end_per_group(_, Config) ->
Expand Down

0 comments on commit 3fd96b5

Please sign in to comment.