Skip to content

Commit a678c78

Browse files
Merge pull request #15560 from rabbitmq/mergify/bp/v4.2.x/pr-15558
Test flakes feb25 2026 (backport #15558)
2 parents db2c2a0 + f10ec0c commit a678c78

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

deps/rabbit/test/quorum_queue_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,8 +2978,8 @@ simple_confirm_availability_on_leader_change(Config) ->
29782978
assert_cluster_status({Servers, Servers, Running}, Running),
29792979

29802980
%% this should not fail as the channel should detect the new leader and
2981-
%% resend to that
2982-
ok = publish_confirm(Ch, QQ),
2981+
%% resend to that. Use a generous timeout because on slow CI.
2982+
ok = publish_confirm(Ch, QQ, 15000),
29832983
ok = rabbit_ct_broker_helpers:start_node(Config, Node2),
29842984
ok.
29852985

deps/rabbitmq_cli/lib/rabbitmq/cli/core/distribution.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ defmodule RabbitMQ.CLI.Core.Distribution do
9191
{:ok, pid}
9292

9393
{:error, reason} ->
94+
:timer.sleep(500)
9495
start(node_name_type, attempts - 1, reason)
9596
end
9697
end
@@ -118,7 +119,7 @@ defmodule RabbitMQ.CLI.Core.Distribution do
118119
Enum.random(1..1024)
119120

120121
_ ->
121-
"#{:os.getpid()}"
122+
"#{:os.getpid()}-#{System.unique_integer([:positive])}"
122123
end
123124
end
124125
end

deps/rabbitmq_mqtt/test/retainer_SUITE.erl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ end_per_testcase(Testcase, Config) ->
112112
%% -------------------------------------------------------------------
113113

114114
coerce_configuration_data(Config) ->
115-
C = connect(<<"simpleClientRetainer">>, Config, [{ack_timeout, 1}]),
115+
C = connect(atom_to_binary(?FUNCTION_NAME), Config, [{ack_timeout, 1}]),
116116

117117
{ok, _, _} = emqtt:subscribe(C, <<"TopicA">>, qos0),
118118
ok = emqtt:publish(C, <<"TopicA">>, <<"Payload">>),
@@ -126,7 +126,7 @@ coerce_configuration_data(Config) ->
126126
%% sent messages for the translated topic (TopicA/Device/Field)
127127
%% -------------------------------------------------------------------
128128
should_translate_amqp2mqtt_on_publish(Config) ->
129-
C = connect(<<"simpleClientRetainer">>, Config, [{ack_timeout, 1}]),
129+
C = connect(atom_to_binary(?FUNCTION_NAME), Config, [{ack_timeout, 1}]),
130130
%% there's an active consumer
131131
{ok, _, _} = emqtt:subscribe(C, <<"TopicA/Device.Field">>, qos1),
132132
ok = emqtt:publish(C, <<"TopicA/Device.Field">>, #{}, <<"Payload">>, [{retain, true}]),
@@ -139,7 +139,7 @@ should_translate_amqp2mqtt_on_publish(Config) ->
139139
%% sent the retained message for the translated topic (TopicA/Device/Field)
140140
%% -------------------------------------------------------------------
141141
should_translate_amqp2mqtt_on_retention(Config) ->
142-
C = connect(<<"simpleClientRetainer">>, Config, [{ack_timeout, 1}]),
142+
C = connect(atom_to_binary(?FUNCTION_NAME), Config, [{ack_timeout, 1}]),
143143
%% publish with retain = true before a consumer comes around
144144
ok = emqtt:publish(C, <<"TopicA/Device.Field">>, #{}, <<"Payload">>, [{retain, true}]),
145145
{ok, _, _} = emqtt:subscribe(C, <<"TopicA/Device.Field">>, qos1),
@@ -152,14 +152,14 @@ should_translate_amqp2mqtt_on_retention(Config) ->
152152
%% sent retained message for the translated topic (TopicA/Device/Field)
153153
%% -------------------------------------------------------------------
154154
should_translate_amqp2mqtt_on_retention_search(Config) ->
155-
C = connect(<<"simpleClientRetainer">>, Config, [{ack_timeout, 1}]),
155+
C = connect(atom_to_binary(?FUNCTION_NAME), Config, [{ack_timeout, 1}]),
156156
ok = emqtt:publish(C, <<"TopicA/Device.Field">>, #{}, <<"Payload">>, [{retain, true}]),
157157
{ok, _, _} = emqtt:subscribe(C, <<"TopicA/Device/Field">>, qos1),
158158
ok = expect_publishes(C, <<"TopicA/Device/Field">>, [<<"Payload">>]),
159159
ok = emqtt:disconnect(C).
160160

161161
does_not_retain(Config) ->
162-
C = connect(<<"simpleClientRetainer">>, Config, [{ack_timeout, 1}]),
162+
C = connect(atom_to_binary(?FUNCTION_NAME), Config, [{ack_timeout, 1}]),
163163
ok = emqtt:publish(C, <<"TopicA/Device.Field">>, #{}, <<"Payload">>, [{retain, true}]),
164164
{ok, _, _} = emqtt:subscribe(C, <<"TopicA/Device.Field">>, qos1),
165165
receive

0 commit comments

Comments
 (0)