Skip to content

Commit 7d3292c

Browse files
michaelklishindcorbacho
authored andcommitted
quorum_queue_SUITE: keep Raft state logging in force_checkpoint_on_queue
1 parent d17b085 commit 7d3292c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

deps/rabbit/test/quorum_queue_SUITE.erl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ force_checkpoint_on_queue(Config) ->
13531353
?assertEqual({'queue.declare_ok', QQ, 0, 0},
13541354
declare(Ch, QQ, [{<<"x-queue-type">>, longstr, <<"quorum">>}])),
13551355

1356-
N = 17000,
1356+
N = 20_000,
13571357
rabbit_ct_client_helpers:publish(Ch, QQ, N),
13581358
wait_for_messages_ready([Server0], RaName, N),
13591359

@@ -1365,19 +1365,21 @@ force_checkpoint_on_queue(Config) ->
13651365
LCI =:= undefined
13661366
end),
13671367

1368-
%% {ok, State0, _} = rpc:call(Server0, ra, member_overview, [{RaName, Server0}]),
1369-
%% ct:pal("Ra server state before forcing a checkpoint: ~tp~n", [State0]),
1368+
{ok, State0, _} = rpc:call(Server0, ra, member_overview, [{RaName, Server0}]),
1369+
ct:pal("Ra server state before forcing a checkpoint: ~tp~n", [State0]),
13701370

1371+
%% wait for longer than ?CHECK_MIN_INTERVAL_MS ms
1372+
timer:sleep(?CHECK_MIN_INTERVAL_MS + 1000),
13711373
rabbit_ct_broker_helpers:rpc(Config, 0, rabbit_quorum_queue,
13721374
force_checkpoint_on_queue, [QName]),
13731375

13741376
%% Wait for initial checkpoint and make sure it's not 0
13751377
rabbit_ct_helpers:await_condition(
13761378
fun() ->
13771379
{ok, State, _} = rpc:call(Server0, ra, member_overview, [{RaName, Server0}]),
1378-
%% ct:pal("Ra server state: ~tp~n", [State]),
1380+
ct:pal("Ra server state post forced checkpoint: ~tp~n", [State]),
13791381
#{log := #{latest_checkpoint_index := LCI}} = State,
1380-
LCI >= N
1382+
(LCI =/= undefined) andalso (LCI >= N)
13811383
end).
13821384

13831385
force_checkpoint(Config) ->

0 commit comments

Comments
 (0)