@@ -1323,26 +1323,31 @@ force_checkpoint_on_queue(Config) ->
1323
1323
? assertEqual ({'queue.declare_ok' , QQ , 0 , 0 },
1324
1324
declare (Ch , QQ , [{<<" x-queue-type" >>, longstr , <<" quorum" >>}])),
1325
1325
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 ),
1328
1329
1329
- % Wait for initial checkpoint and make sure it's 0; checkpoint hasn't been triggered yet.
1330
+ % % The state before any checkpoints
1330
1331
rabbit_ct_helpers :await_condition (
1331
1332
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
1335
1336
end ),
1336
1337
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
+
1337
1341
rabbit_ct_broker_helpers :rpc (Config , 0 , rabbit_quorum_queue ,
1338
1342
force_checkpoint_on_queue , [QName ]),
1339
1343
1340
- % Wait for initial checkpoint and make sure it's not 0
1344
+ % % Wait for initial checkpoint and make sure it's not 0
1341
1345
rabbit_ct_helpers :await_condition (
1342
1346
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
1346
1351
end ).
1347
1352
1348
1353
force_checkpoint (Config ) ->
0 commit comments