Skip to content

Commit

Permalink
Issue 12019 Fix flaky test ManagedLedgerTest.testMaximumRolloverTime (a…
Browse files Browse the repository at this point in the history
…pache#12030)

(cherry picked from commit ae625ef)
  • Loading branch information
mostafij-rahman authored and codelipenghui committed Jan 27, 2022
1 parent b85d06e commit 5a491c4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1774,11 +1774,12 @@ public void testMaximumRolloverTime() throws Exception {

assertEquals(ledger.getLedgersInfoAsList().size(), 1);

Thread.sleep(2000);

ledger.addEntry("data".getBytes());
ledger.addEntry("data".getBytes());
assertEquals(ledger.getLedgersInfoAsList().size(), 2);

Awaitility.await().untilAsserted(() -> {
assertEquals(ledger.getLedgersInfoAsList().size(), 2);
});
}

@Test
Expand Down

0 comments on commit 5a491c4

Please sign in to comment.