Skip to content

Commit

Permalink
[improve][test][branch-3.0] Improve ManagedLedgerTest.testGetNumberOf…
Browse files Browse the repository at this point in the history
…EntriesInStorage

- improve the test case based on suggestion from @poorbarcode
  • Loading branch information
lhotari committed Mar 28, 2024
1 parent d3f0a4b commit 8f17446
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2640,10 +2640,10 @@ public void testGetNumberOfEntriesInStorage() throws Exception {
Awaitility.await().untilAsserted(() -> {
assertEquals(managedLedger.getState(), ManagedLedgerImpl.State.ClosedLedger);
});
managedLedger.rollCurrentLedgerIfFull();
managedLedger.createLedgerAfterClosed();
Awaitility.await().untilAsserted(() -> {
assertEquals(managedLedger.getLedgersInfo().size(), 2);
assertEquals(managedLedger.getState(), ManagedLedgerImpl.State.ClosedLedger);
assertEquals(managedLedger.getLedgersInfo().size(), 3);
assertEquals(managedLedger.getState(), ManagedLedgerImpl.State.LedgerOpened);
});
assertEquals(5, managedLedger.getLedgersInfoAsList().get(0).getEntries());
assertEquals(5, managedLedger.getLedgersInfoAsList().get(1).getEntries());
Expand Down

0 comments on commit 8f17446

Please sign in to comment.