Repository navigation
Closed
Labels
type/bugThe PR fixed a bug or issue reported a bug
Description
Describe the bug
In branch-2.8, ManagedLedgerTest#testGetNumberOfEntriesInStorage cannot pass. We can see the example failure from https://github.com/apache/pulsar/runs/7534114748?check_suite_focus=true and other earlier runs.
To Reproduce
Run the test, we can see
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in org.apache.bookkeeper.mledger.impl.ManagedLedgerTest that uses org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl expected [2] but found [3] within 10 seconds.
at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
at org.apache.bookkeeper.mledger.impl.ManagedLedgerTest.testGetNumberOfEntriesInStorage(ManagedLedgerTest.java:2237)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
Expected behavior
The test should pass.
Metadata
Metadata
Assignees
Labels
type/bugThe PR fixed a bug or issue reported a bug
Activity
BewareMyPower commentedon Jul 27, 2022
This issue was introduced from #15627.
I found #15627 (comment) mentioned this test relies on #14672 that should not be cherry-picked into release branches.
@HQebupt Could you take a look?
BewareMyPower commentedon Jul 28, 2022
This behavior is caused by the behavior change of
ManagedLedgerImpl#rollCurrentLedgerIfFullin #14622, which should only be included in branch-2.11.Then I checked the test in branch-2.9 and branch-2.10.
For branch-2.9, when 53615e0 cherry-picked #15837, it also changed the test to
see here
For branch-2.10, this test failure was fixed by #15995.
I will push a commit directly to fix the test in branch-2.8 soon. /cc @mattisonchao @codelipenghui @nicoloboschi
Regarding the master branch and the incoming 2.11.0 release, #16806, which is marked as the release blocker, should restore the original behavior.
[branch-2.8] Fix ManagedLedgerTest#testGetNumberOfEntriesInStorage
BewareMyPower commentedon Jul 28, 2022
Close the issue by c534be7