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 #14000

Conversation

gaozhangmin
Copy link
Contributor

@gaozhangmin gaozhangmin commented Jan 28, 2022

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

Documentation

Check the box below or label this PR directly (if you have committer privilege).

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions
Copy link

@gaozhangmin:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@gaozhangmin gaozhangmin changed the title fix flaky test [Flaky-test] BacklogQuotaManagerTest#testConsumerBacklogEvictionTimeQuota Jan 28, 2022
@github-actions
Copy link

@gaozhangmin:Thanks for providing doc info!

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaozhangmin - great find! Thanks for looking into this flaky test. I have a couple suggestions about additional assertions that might also be valuable.

@gaozhangmin
Copy link
Contributor Author

/pulsarbot run-failure-checks

@codelipenghui codelipenghui modified the milestones: 2.10.0, 2.11.0 Feb 8, 2022
@gaozhangmin
Copy link
Contributor Author

@Jason918 PTAL

@gaozhangmin gaozhangmin force-pushed the flakyTest-testConsumerBacklogEvictionTimeQuota branch from c8e854a to 2578c85 Compare February 10, 2022 10:04
@gaozhangmin gaozhangmin requested a review from Jason918 February 10, 2022 10:14
Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaozhangmin
Copy link
Contributor Author

/pulsarbot run-failure-checks

@gaozhangmin
Copy link
Contributor Author

/pulsarbot run-failure-checks

Copy link
Contributor

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Seen also today

2022-02-11T01:54:21.9467754Z [ERROR] testConsumerBacklogEvictionTimeQuota(org.apache.pulsar.broker.service.BacklogQuotaManagerTest)  Time elapsed: 6.373 s  <<< FAILURE!
2022-02-11T01:54:21.9468391Z java.lang.AssertionError: expected [4] but found [5]
2022-02-11T01:54:21.9468784Z 	at org.testng.Assert.fail(Assert.java:99)
2022-02-11T01:54:21.9471540Z 	at org.testng.Assert.failNotEquals(Assert.java:1037)
2022-02-11T01:54:21.9471998Z 	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
2022-02-11T01:54:21.9472925Z 	at org.testng.Assert.assertEquals(Assert.java:122)
2022-02-11T01:54:21.9473422Z 	at org.testng.Assert.assertEquals(Assert.java:797)
2022-02-11T01:54:21.9473867Z 	at org.testng.Assert.assertEquals(Assert.java:807)
2022-02-11T01:54:21.9474520Z 	at org.apache.pulsar.broker.service.BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuota(BacklogQuotaManagerTest.java:480)
2022-02-11T01:54:21.9475288Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2022-02-11T01:54:21.9475861Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2022-02-11T01:54:21.9476643Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2022-02-11T01:54:21.9477241Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2022-02-11T01:54:21.9477700Z 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
2022-02-11T01:54:21.9478377Z 	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
2022-02-11T01:54:21.9478873Z 	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
2022-02-11T01:54:21.9479353Z 	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
2022-02-11T01:54:21.9479857Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2022-02-11T01:54:21.9480332Z 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2022-02-11T01:54:21.9480920Z 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2022-02-11T01:54:21.9481313Z 	at java.base/java.lang.Thread.run(Thread.java:829)

@gaozhangmin
Copy link
Contributor Author

@merlimat This can be merged also.

@michaeljmarshall michaeljmarshall merged commit 0ff2b8c into apache:master Feb 11, 2022
@michaeljmarshall michaeljmarshall modified the milestones: 2.11.0, 2.10.0 Feb 11, 2022
@michaeljmarshall
Copy link
Member

@gaozhangmin - thanks for fixing this flaky test!

nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request 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 pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs type/flaky-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky-test: BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuota
5 participants