Skip to content

Commit

Permalink
Mixed version test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pjk25 committed Mar 18, 2024
1 parent e3051f8 commit 5271c26
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion deps/rabbitmq_mqtt/test/command_SUITE.erl
Expand Up @@ -57,7 +57,23 @@ init_per_group(unit, Config) ->
Config;
init_per_group(Group, Config) ->
Config1 = rabbit_ct_helpers:set_config(Config, {mqtt_version, Group}),
util:maybe_skip_v5(Config1).
case Group of
v4 ->
AllApps = rabbit_ct_broker_helpers:rpc_all(Config1, application, loaded_applications, []),
AllAppNames = lists:map(fun (AppList) ->
lists:map(fun ({Name, _, _}) -> Name end, AppList)
end, AllApps),
case lists:all(fun (NodeApps) ->
lists:member(rabbit_web_mqtt_app, NodeApps)
end, AllAppNames) of
true ->
Config1;
false ->
{skip, "rabbit_web_mqtt_app not available on all nodes"}
end;
v5 ->
util:maybe_skip_v5(Config1)
end.

end_per_group(_, Config) ->
Config.
Expand Down

0 comments on commit 5271c26

Please sign in to comment.