Skip to content

Commit 18af390

Browse files
kjnilssonmergify[bot]
authored andcommitted
Fix flake in rabbit_stream_queue_SUITE
(cherry picked from commit 2b09891)
1 parent 7d6b4f4 commit 18af390

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/rabbit/test/rabbit_stream_queue_SUITE.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,9 @@ add_replicas(Config) ->
492492
#'confirm.select_ok'{} = amqp_channel:call(Ch, #'confirm.select'{}),
493493
amqp_channel:register_confirm_handler(Ch, self()),
494494
[publish(Ch, Q, Data) || _ <- lists:seq(1, NumMsgs)],
495-
%% should be sufficient sleepage for the next message to fall in the next
496-
%% chunk
497-
timer:sleep(10),
495+
%% wait for confirms here to ensure the next message ends up in a chunk
496+
%% of it's own
497+
amqp_channel:wait_for_confirms(Ch, 30),
498498
publish(Ch, Q, <<"last">>),
499499
amqp_channel:wait_for_confirms(Ch, 30),
500500
?assertEqual(ok,

0 commit comments

Comments
 (0)