Flaky-test: BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuota
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
BacklogQuotaManagerTest is flaky. The `testConsumerBacklogEvictionTimeQuota` test method fails sporadically.
example failure: https://github.com/apache/pulsar/runs/4942921605?check_suite_focus=true from https://github.com/apache/pulsar/pull/13950
```
Error: Tests run: 36, Failures: 14, Errors: 0, Skipped: 15, Time elapsed: 92.604 s <<< FAILURE! - in org.apache.pulsar.broker.service.BacklogQuotaManagerTest
Error: testConsumerBacklogEvictionTimeQuota(org.apache.pulsar.broker.service.BacklogQuotaManagerTest) Time elapsed: 6.434 s <<< FAILURE!
java.lang.AssertionError: expected [4] but found [5]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at org.apache.pulsar.broker.service.BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuota(BacklogQuotaManagerTest.java:480)
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.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
```
Contributor guide
Research direction
Start by reading BacklogQuotaManagerTest, especially testConsumerBacklogEvictionTimeQuota and the assertion reported at line 480, then run that test repeatedly to observe the failure. Done means identifying and addressing the flakiness so the test passes reliably without the intermittent expected-4 versus found-5 result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100