Skip to content

Commit

Permalink
[fix][test] Fix the flaky tests of ManagedLedgerImplUtilsTest (apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
codelipenghui authored Apr 29, 2024
1 parent a761b97 commit 264722f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.testng.Assert.assertEquals;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import lombok.extern.slf4j.Slf4j;
import org.apache.bookkeeper.mledger.Entry;
Expand All @@ -41,6 +42,8 @@ public void testGetLastValidPosition() throws Exception {

ManagedLedgerConfig managedLedgerConfig = new ManagedLedgerConfig();
managedLedgerConfig.setMaxEntriesPerLedger(maxEntriesPerLedger);
managedLedgerConfig.setRetentionSizeInMB(10);
managedLedgerConfig.setRetentionTime(5, TimeUnit.MINUTES);
ManagedLedger ledger = factory.open("testReverseFindPositionOneByOne", managedLedgerConfig);

String matchEntry = "match-entry";
Expand Down

0 comments on commit 264722f

Please sign in to comment.