Skip to content

Commit 2320853

Browse files
committed
Add debugging for MQTT flake
``` === Ended at 2026-02-24 16:00:20 === Location: [{mqtt_shared_SUITE,session_switch,1518}, {test_server,ts_tc,1796}, {test_server,run_test_case_eval1,1305}, {test_server,run_test_case_eval,1237}] === === Reason: {failed, {test_case_failed, {unexpected, {publish, #{client_pid => <0.1399.0>,dup => false, packet_id => 1,payload => <<"m1">>, properties => undefined,qos => 1, retain => false, topic => <<"session_switch">>, via => #Port<0.353>}}}}} ```
1 parent cf69ee6 commit 2320853

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

deps/rabbitmq_mqtt/test/mqtt_shared_SUITE.erl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,13 +1484,13 @@ duplicate_client_id(Config) ->
14841484
eventually(?_assertEqual(0, length(all_connection_pids(Config)))).
14851485

14861486
session_reconnect(Config) ->
1487-
session_switch(Config, true).
1487+
session_switch(Config, true, ?FUNCTION_NAME).
14881488

14891489
session_takeover(Config) ->
1490-
session_switch(Config, false).
1490+
session_switch(Config, false, ?FUNCTION_NAME).
14911491

1492-
session_switch(Config, Disconnect) ->
1493-
Topic = ClientId = atom_to_binary(?FUNCTION_NAME),
1492+
session_switch(Config, Disconnect, Name) ->
1493+
Topic = ClientId = atom_to_binary(Name),
14941494
%% Connect to old node in mixed version cluster.
14951495
C1 = connect(ClientId, Config, 1, non_clean_sess_opts()),
14961496
{ok, _, [1]} = emqtt:subscribe(C1, Topic, qos1),
@@ -1515,7 +1515,9 @@ session_switch(Config, Disconnect) ->
15151515
%% New connection should be able to unsubscribe.
15161516
?assertMatch({ok, _, _}, emqtt:unsubscribe(C2, Topic)),
15171517
{ok, _} = emqtt:publish(C2, Topic, <<"m2">>, qos1),
1518-
receive Unexpected -> ct:fail({unexpected, Unexpected})
1518+
receive Unexpected ->
1519+
ct:pal("C1=~p C2=~p", [C1, C2]),
1520+
ct:fail({unexpected, Unexpected})
15191521
after 300 -> ok
15201522
end,
15211523

0 commit comments

Comments
 (0)