Skip to content

Commit a4a2362

Browse files
committed
[Why]
This flaked today since the restart too 309ms, why above the allowed 100ms (outside of CI, it takes single-digit ms) [How] Increase the allowed time but also significantly increase next_seq_id. This test exists because in the past we had an O(n) algorithm in CQ recovery, leading to a slow recovery of even empty queues, if they had a very large next_seq_id. Now that this operation is O(1), a much larger next_seq_id shouldn't affect the time it takes to run this test, while accidentally re-intrudcing an O(n) algorithm should fail this test consistently.
1 parent 4e23f8d commit a4a2362

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbit/test/backing_queue_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ variable_queue_restart_large_seq_id2(VQ0, QName) ->
14471447

14481448
%% set a very high next_seq_id as if 100M messages have been
14491449
%% published and consumed
1450-
Terms2 = lists:keyreplace(next_seq_id, 1, Terms, {next_seq_id, 100_000_000}),
1450+
Terms2 = lists:keyreplace(next_seq_id, 1, Terms, {next_seq_id, 100_000_000_000}),
14511451

14521452
{TInit, VQ3} =
14531453
timer:tc(
@@ -1456,7 +1456,7 @@ variable_queue_restart_large_seq_id2(VQ0, QName) ->
14561456
%% even with a very high next_seq_id start of an empty queue
14571457
%% should be quick (few milliseconds, but let's give it 100ms, to
14581458
%% avoid flaking on slow servers)
1459-
{true, _} = {TInit < 100, TInit},
1459+
{true, _} = {TInit < 500, TInit},
14601460

14611461
%% should be empty now
14621462
true = rabbit_variable_queue:is_empty(VQ3),

0 commit comments

Comments
 (0)