Skip to content

Commit 127306c

Browse files
Merge pull request #10825 from rabbitmq/10761-follow-ups
PR #10761 follow ups
2 parents e734201 + 3fd96b5 commit 127306c

File tree

4 files changed

+11
-26
lines changed

4 files changed

+11
-26
lines changed

deps/rabbitmq_mqtt/include/rabbit_mqtt.hrl

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
-define(PERSISTENT_TERM_EXCHANGE, mqtt_exchange).
1313
-define(DEFAULT_MQTT_EXCHANGE, <<"amq.topic">>).
1414
-define(MQTT_GUIDE_URL, <<"https://rabbitmq.com/docs/mqtt/">>).
15-
-define(WEB_MQTT_GUIDE_URL, <<"https://rabbitmq.com/docs/web-mqtt/">>).
1615

1716
-define(MQTT_TCP_PROTOCOL, 'mqtt').
1817
-define(MQTT_TLS_PROTOCOL, 'mqtt/ssl').

deps/rabbitmq_mqtt/test/command_SUITE.erl

+2-17
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,9 @@ end_per_suite(Config) ->
5656
init_per_group(unit, Config) ->
5757
Config;
5858
init_per_group(Group, Config) ->
59+
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, delete_ra_cluster_mqtt_node),
5960
Config1 = rabbit_ct_helpers:set_config(Config, {mqtt_version, Group}),
60-
case Group of
61-
v4 ->
62-
AllApps = rabbit_ct_broker_helpers:rpc_all(Config1, application, loaded_applications, []),
63-
AllAppNames = lists:map(fun (AppList) ->
64-
lists:map(fun ({Name, _, _}) -> Name end, AppList)
65-
end, AllApps),
66-
case lists:all(fun (NodeApps) ->
67-
lists:member(rabbit_web_mqtt_app, NodeApps)
68-
end, AllAppNames) of
69-
true ->
70-
Config1;
71-
false ->
72-
{skip, "rabbit_web_mqtt_app not available on all nodes"}
73-
end;
74-
v5 ->
75-
util:maybe_skip_v5(Config1)
76-
end.
61+
util:maybe_skip_v5(Config1).
7762

7863
end_per_group(_, Config) ->
7964
Config.

deps/rabbitmq_web_mqtt/src/Elixir.RabbitMQ.CLI.Ctl.Commands.ListWebMqttConnectionsCommand.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ usage_additional() ->
5959
].
6060

6161
usage_doc_guides() ->
62-
[?WEB_MQTT_GUIDE_URL].
62+
[<<"https://rabbitmq.com/docs/web-mqtt">>].
6363

6464
run(Args, #{node := NodeName,
6565
timeout := Timeout,

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)