Skip to content

Commit 5f6a1f9

Browse files
committed
Remove unused NodeId parameter
1 parent bec8f9a commit 5f6a1f9

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

deps/rabbitmq_mqtt/test/cluster_SUITE.erl

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,18 @@ connection_id_tracking(Config) ->
115115
ok = expect_publishes(C1, <<"TopicA">>, [<<"Payload">>]),
116116

117117
%% there's one connection
118-
assert_connection_count(Config, 4, 2, 1),
118+
assert_connection_count(Config, 4, 1),
119119

120120
%% connect to the same node (A or 0)
121121
process_flag(trap_exit, true),
122122
C2 = connect(Id, Config, 0, ?OPTS),
123123
await_exit(C1),
124-
assert_connection_count(Config, 4, 2, 1),
124+
assert_connection_count(Config, 4, 1),
125125

126126
%% connect to a different node (C or 2)
127127
C3 = connect(Id, Config, 2, ?OPTS),
128128
await_exit(C2),
129-
assert_connection_count(Config, 4, 2, 1),
129+
assert_connection_count(Config, 4, 1),
130130
ok = emqtt:disconnect(C3).
131131

132132
connection_id_tracking_on_nodedown(Config) ->
@@ -135,11 +135,11 @@ connection_id_tracking_on_nodedown(Config) ->
135135
{ok, _, _} = emqtt:subscribe(C, <<"TopicA">>, qos0),
136136
ok = emqtt:publish(C, <<"TopicA">>, <<"Payload">>),
137137
ok = expect_publishes(C, <<"TopicA">>, [<<"Payload">>]),
138-
assert_connection_count(Config, 4, 2, 1),
138+
assert_connection_count(Config, 4, 1),
139139
process_flag(trap_exit, true),
140140
ok = stop_node(Config, Server),
141141
await_exit(C),
142-
assert_connection_count(Config, 4, 2, 0),
142+
assert_connection_count(Config, 4, 0),
143143
ok.
144144

145145
connection_id_tracking_with_decommissioned_node(Config) ->
@@ -153,26 +153,27 @@ connection_id_tracking_with_decommissioned_node(Config) ->
153153
ok = emqtt:publish(C, <<"TopicA">>, <<"Payload">>),
154154
ok = expect_publishes(C, <<"TopicA">>, [<<"Payload">>]),
155155

156-
assert_connection_count(Config, 4, 2, 1),
156+
assert_connection_count(Config, 4, 1),
157157
process_flag(trap_exit, true),
158158
{ok, _} = rabbitmqctl(Config, 0, ["decommission_mqtt_node", Server]),
159159
await_exit(C),
160-
assert_connection_count(Config, 5, 2, 0),
160+
assert_connection_count(Config, 4, 0),
161161
ok
162162
end.
163163

164164
%%
165165
%% Helpers
166166
%%
167167

168-
assert_connection_count(_Config, 0, _, NumElements) ->
168+
assert_connection_count(_Config, 0, NumElements) ->
169169
ct:fail("failed to match connection count ~b", [NumElements]);
170-
assert_connection_count(Config, Retries, NodeId, NumElements) ->
170+
assert_connection_count(Config, Retries, NumElements) ->
171171
case util:all_connection_pids(Config) of
172-
Pids
173-
when length(Pids) =:= NumElements ->
172+
Pids when length(Pids) =:= NumElements ->
174173
ok;
175-
_ ->
174+
Pids ->
175+
ct:pal("Waiting for ~b connections, got following connections: ~p",
176+
[NumElements, Pids]),
176177
timer:sleep(500),
177-
assert_connection_count(Config, Retries-1, NodeId, NumElements)
178+
assert_connection_count(Config, Retries-1, NumElements)
178179
end.

0 commit comments

Comments
 (0)