Skip to content

Commit 1825f2b

Browse files
committed
Fix flake in rabbit_stream_queue_SUITE
1 parent c36b56b commit 1825f2b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

deps/rabbit/test/rabbit_stream_queue_SUITE.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ all_tests_4() ->
170170
init_per_suite(Config0) ->
171171
rabbit_ct_helpers:log_environment(),
172172
Config = rabbit_ct_helpers:merge_app_env(
173-
Config0, {rabbit, [{stream_tick_interval, 1000},
173+
Config0, {rabbit, [{stream_tick_interval, 256},
174174
{log, [{file, [{level, debug}]}]}]}),
175175
rabbit_ct_helpers:run_setup_steps(Config).
176176

@@ -436,7 +436,11 @@ declare_queue(Config) ->
436436
declare(Config, Server, Q, [{<<"x-queue-type">>, longstr, <<"stream">>}])),
437437

438438
%% Test declare an existing queue
439-
?assertEqual({'queue.declare_ok', Q, 0, 0},
439+
%% there is a very brief race condition in the osiris counter updates that could
440+
%% cause the message count to be reported as 1 temporarily after a new stream
441+
%% creation. Hence to avoid flaking we don't match on the messages counter
442+
%% here
443+
?assertMatch({'queue.declare_ok', Q, _, 0},
440444
declare(Config, Server, Q, [{<<"x-queue-type">>, longstr, <<"stream">>}])),
441445

442446
?assertMatch([_], find_queue_info(Config, [])),

0 commit comments

Comments
 (0)