@@ -1323,26 +1323,31 @@ force_checkpoint_on_queue(Config) ->
13231323 ? assertEqual ({'queue.declare_ok' , QQ , 0 , 0 },
13241324 declare (Ch , QQ , [{<<" x-queue-type" >>, longstr , <<" quorum" >>}])),
13251325
1326- rabbit_ct_client_helpers :publish (Ch , QQ , 3 ),
1327- wait_for_messages_ready ([Server0 ], RaName , 3 ),
1326+ N = 17000 ,
1327+ rabbit_ct_client_helpers :publish (Ch , QQ , N ),
1328+ wait_for_messages_ready ([Server0 ], RaName , N ),
13281329
1329- % Wait for initial checkpoint and make sure it's 0; checkpoint hasn't been triggered yet.
1330+ % % The state before any checkpoints
13301331 rabbit_ct_helpers :await_condition (
13311332 fun () ->
1332- {ok , #{ aux : = Aux } , _ } = rpc :call (Server0 , ra , member_overview , [{RaName , Server0 }]),
1333- # aux_v3 { last_checkpoint = # checkpoint { index = Index }} = Aux ,
1334- Index =:= 0
1333+ {ok , State , _ } = rpc :call (Server0 , ra , member_overview , [{RaName , Server0 }]),
1334+ #{ log : = #{ latest_checkpoint_index : = LCI }} = State ,
1335+ LCI =:= undefined
13351336 end ),
13361337
1338+ % % {ok, State0, _} = rpc:call(Server0, ra, member_overview, [{RaName, Server0}]),
1339+ % % ct:pal("Ra server state before forcing a checkpoint: ~tp~n", [State0]),
1340+
13371341 rabbit_ct_broker_helpers :rpc (Config , 0 , rabbit_quorum_queue ,
13381342 force_checkpoint_on_queue , [QName ]),
13391343
1340- % Wait for initial checkpoint and make sure it's not 0
1344+ % % Wait for initial checkpoint and make sure it's not 0
13411345 rabbit_ct_helpers :await_condition (
13421346 fun () ->
1343- {ok , #{aux := Aux }, _ } = rpc :call (Server0 , ra , member_overview , [{RaName , Server0 }]),
1344- # aux_v3 {last_checkpoint = # checkpoint {index = Index }} = Aux ,
1345- Index =/= 0
1347+ {ok , State , _ } = rpc :call (Server0 , ra , member_overview , [{RaName , Server0 }]),
1348+ % % ct:pal("Ra server state: ~tp~n", [State]),
1349+ #{log := #{latest_checkpoint_index := LCI }} = State ,
1350+ LCI >= N
13461351 end ).
13471352
13481353force_checkpoint (Config ) ->
0 commit comments