Skip to content

Commit

Permalink
[fix][test] fix flaky test testRecoverSequenceId (apache#18437)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyepianzhou authored and lifepuzzlefun committed Jan 10, 2023
1 parent 6a14607 commit a2d74eb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ public void testRecoverSequenceId(boolean isUseManagedLedgerProperties) throws E
stateUpdater.setAccessible(true);
stateUpdater.set(managedLedger, ManagedLedgerImpl.State.LedgerOpened);
managedLedger.rollCurrentLedgerIfFull();
Awaitility.await().until(() -> {
return !managedLedger.ledgerExists(position.getLedgerId());
});
//There is new ledger been created
Awaitility.await().until(() -> managedLedger.getLedgersInfo().ceilingEntry(position.getLedgerId()) != null);
}
mlTransactionLog.closeAsync().get(2, TimeUnit.SECONDS);
mlTransactionLog = new MLTransactionLogImpl(transactionCoordinatorID, factory,
Expand Down

0 comments on commit a2d74eb

Please sign in to comment.