Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2309,8 +2309,10 @@ public void testNoRetention() throws Exception {
c1 = ml.openCursor("c1noretention");
ml.addEntry("shortmessage".getBytes());
c1.skipEntries(1, IndividualDeletedEntries.Exclude);
// sleep for trim
Thread.sleep(1000);
// Explicitly trigger trimming and wait for it to complete
CompletableFuture<Void> trimFuture = new CompletableFuture<>();
ml.trimConsumedLedgersInBackground(trimFuture);
trimFuture.join();
ml.close();

assertTrue(ml.getLedgersInfoAsList().size() <= 1);
Expand Down
Loading