Skip to content

Commit

Permalink
[fix][test][branch-3.0] Fix broken ManagedLedgerTest.testGetNumberOfE…
Browse files Browse the repository at this point in the history
…ntriesInStorage

- change apache#22034 is missing from branch-3.0

(cherry picked from commit e3531e8)
  • Loading branch information
lhotari authored and mukesh-ctds committed Apr 18, 2024
1 parent 8c3dd37 commit a7a19b2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2638,12 +2638,12 @@ public void testGetNumberOfEntriesInStorage() throws Exception {

// trigger ledger rollover and wait for the new ledger created
Awaitility.await().untilAsserted(() -> {
assertEquals("LedgerOpened", WhiteboxImpl.getInternalState(managedLedger, "state").toString());
assertEquals(managedLedger.getState(), ManagedLedgerImpl.State.ClosedLedger);
});
managedLedger.createLedgerAfterClosed();
Awaitility.await().untilAsserted(() -> {
assertEquals(managedLedger.getLedgersInfo().size(), 3);
assertEquals(managedLedger.getState(), ManagedLedgerImpl.State.LedgerOpened);
assertEquals(managedLedger.getLedgersInfo().size(), 2);
assertEquals(managedLedger.getState(), ManagedLedgerImpl.State.ClosedLedger);
});
assertEquals(5, managedLedger.getLedgersInfoAsList().get(0).getEntries());
assertEquals(5, managedLedger.getLedgersInfoAsList().get(1).getEntries());
Expand Down

0 comments on commit a7a19b2

Please sign in to comment.