This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 264722f1da9 [fix][test] Fix the flaky tests of
ManagedLedgerImplUtilsTest (#22611)
264722f1da9 is described below
commit 264722f1da9ab806c9a79196c091bfe4d03b3090
Author: Penghui Li <[email protected]>
AuthorDate: Mon Apr 29 11:49:28 2024 +0800
[fix][test] Fix the flaky tests of ManagedLedgerImplUtilsTest (#22611)
---
.../org/apache/bookkeeper/mledger/util/ManagedLedgerImplUtilsTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/util/ManagedLedgerImplUtilsTest.java
b/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/util/ManagedLedgerImplUtilsTest.java
index f13d23c0529..cce593fbb38 100644
---
a/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/util/ManagedLedgerImplUtilsTest.java
+++
b/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/util/ManagedLedgerImplUtilsTest.java
@@ -21,6 +21,7 @@ package org.apache.bookkeeper.mledger.util;
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;
@@ -41,6 +42,8 @@ public class ManagedLedgerImplUtilsTest extends
MockedBookKeeperTestCase {
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";