Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky-test: BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuota #13952

Open
michaeljmarshall opened this issue Jan 25, 2022 · 2 comments · Fixed by #14000 or #14489
Open

Flaky-test: BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuota #13952

michaeljmarshall opened this issue Jan 25, 2022 · 2 comments · Fixed by #14000 or #14489

Comments

@michaeljmarshall
Copy link
Member

BacklogQuotaManagerTest is flaky. The testConsumerBacklogEvictionTimeQuota test method fails sporadically.

example failure: https://github.com/apache/pulsar/runs/4942921605?check_suite_focus=true from #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)
michaeljmarshall pushed a commit that referenced this issue Feb 11, 2022
…uota (#14000)

* fix flaky test

* change to getCurrentLedgerEntries

Co-authored-by: gavingaozhangmin <[email protected]>

### Motivation

Fixes #13952

### Modifications
MAX_ENTRIES_PER_LEDGER = 5,  it will be  uncertain that  the num of entries in last ledger is 4.
Use ManagedLedgerImpl. getNumberOfEntries to get the num of entries in last opened ledger
@RobertIndie
Copy link
Member

This issue doesn't seem to be solved.

Here is another failure after #14000 gets merged.

Error:  testConsumerBacklogEvictionTimeQuota(org.apache.pulsar.broker.service.BacklogQuotaManagerTest)  Time elapsed: 6.378 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:484)
	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)

nicoloboschi pushed a commit to datastax/pulsar that referenced this issue Mar 2, 2022
…uota (apache#14000)

* fix flaky test

* change to getCurrentLedgerEntries

Co-authored-by: gavingaozhangmin <[email protected]>

### Motivation

Fixes apache#13952

### Modifications
MAX_ENTRIES_PER_LEDGER = 5,  it will be  uncertain that  the num of entries in last ledger is 4.
Use ManagedLedgerImpl. getNumberOfEntries to get the num of entries in last opened ledger

(cherry picked from commit 0ff2b8c)
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this issue Apr 20, 2022
…uota (apache#14000)

* fix flaky test

* change to getCurrentLedgerEntries

Co-authored-by: gavingaozhangmin <[email protected]>

### Motivation

Fixes apache#13952

### Modifications
MAX_ENTRIES_PER_LEDGER = 5,  it will be  uncertain that  the num of entries in last ledger is 4.
Use ManagedLedgerImpl. getNumberOfEntries to get the num of entries in last opened ledger
@nicoloboschi nicoloboschi reopened this May 10, 2022
@github-actions
Copy link

The issue had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants