pdolif commented on code in PR #24244: URL: https://github.com/apache/pulsar/pull/24244#discussion_r2072640753
########## managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorTest.java: ########## @@ -1843,6 +1843,12 @@ void testSkipEntriesWithIndividualDeletedMessages(boolean useOpenRangeSet) throw Position pos4 = ledger.addEntry("dummy-entry-4".getBytes(Encoding)); Position pos5 = ledger.addEntry("dummy-entry-5".getBytes(Encoding)); + // Wait until a new ledger is created after the previous one has been closed. + // This happens because maxEntriesPerLedger is set to 5, so a new ledger is opened after every 5 entries. + Awaitility.await().untilAsserted(() -> { + assertTrue(ledger.getLedgersInfo().lastEntry().getKey() > pos5.getLedgerId()); + }); Review Comment: Is it safe to assume that outside of the test code, it is also always waited until the new ledger is created? I am wondering if this actually is a flaky test or if there is an underlying issue that different operations (adding entry, deleting entry, skipping) can be executed concurrently which may lead to undesired states. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org