Skip to content

Commit aa37129

Browse files
ansdmergify[bot]
authored andcommitted
Fix MQTT test flake management_plugin_connection
Prior to this commit this test flaked in CI: ``` === === Reason: {assertEqual, [{module,mqtt_shared_SUITE}, {line,1222}, {expression,"http_get ( Config , \"/connections\" )"}, {expected,[]}, {value, [#{timeout => 99, name => <<"127.0.0.1:58712 -> 127.0.0.1:29005">>, node => <<"rmq-ct-mqtt-cluster_size_1-1-29000@localhost">>, port => 29005,user => <<"guest">>,ssl => false, protocol => <<"MQTT 5-0">>, host => <<"127.0.0.1">>, client_properties => #{client_id => <<"management_plugin_connection">>}, vhost => <<"/">>,peer_host => <<"127.0.0.1">>, peer_port => 58712,frame_max => 0, channel_max => 0,auth_mechanism => <<"none">>, connected_at => 1730797370048, ssl_protocol => null,ssl_key_exchange => null, ssl_cipher => null,ssl_hash => null, peer_cert_issuer => null, peer_cert_subject => null, peer_cert_validity => null, user_who_performed_action => <<"guest">>}]}]} in function mqtt_shared_SUITE:management_plugin_connection/1 (mqtt_shared_SUITE.erl, line 1222) in call from test_server:ts_tc/3 (test_server.erl, line 1793) in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1302) in call from test_server:run_test_case_eval/9 (test_server.erl, line 1234) ``` (cherry picked from commit 090384f)
1 parent 24cbca1 commit aa37129

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbitmq_mqtt/test/shared_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ management_plugin_connection(Config) ->
11981198
"/connections/" ++ binary_to_list(uri_string:quote(ConnectionName)),
11991199
?NO_CONTENT),
12001200
await_exit(C1),
1201-
?assertEqual([], http_get(Config, "/connections")),
1201+
eventually(?_assertEqual([], http_get(Config, "/connections"))),
12021202
eventually(?_assertEqual([], all_connection_pids(Config)), 500, 3),
12031203

12041204
C2 = connect(ClientId, Config, [{keepalive, KeepaliveSecs}]),
@@ -1207,7 +1207,7 @@ management_plugin_connection(Config) ->
12071207
"/connections/username/guest",
12081208
?NO_CONTENT),
12091209
await_exit(C2),
1210-
?assertEqual([], http_get(Config, "/connections")),
1210+
eventually(?_assertEqual([], http_get(Config, "/connections"))),
12111211
eventually(?_assertEqual([], all_connection_pids(Config)), 500, 3).
12121212

12131213
management_plugin_enable(Config) ->

0 commit comments

Comments
 (0)