-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][flaky-test]Fix PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest.testMultiLevelDispatch #17389
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
Conversation
| log.info("-- end - start: {} ", end - start); | ||
|
|
||
| // first 10 messages, which equals receiverQueueSize, will not wait. | ||
| Assert.assertTrue((end - start) >= 2500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can't remove this line because we have to use it to verify the rate limiter.
Could you get the actual number here? Maybe 2000 is better or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you. The longer the time, the more accurate the rate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you help explain this new assert? before each message size is rate/10 and we send 30 message, so should take at least 3 second to receive all, but I don't quite understand what this new assert is trying to prove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test case is correct. And I found the failure is due to dataProvider. I update the PR. PTAL.
| // first 10 messages, which equals receiverQueueSize, will not wait. | ||
| Assert.assertTrue((end - start) >= 2500); | ||
| Assert.assertTrue((end - start) <= 8000); | ||
| Assert.assertEquals((end - start), numProducedMessages * expectRate / 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this assertion so certain, it may cause the test to become more unstable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It make sense.
…patcherThrottlingTest.testMultiLevelDispatch
…patcherThrottlingTest.testMultiLevelDispatch
efab21f to
70ed2bc
Compare
977a410 to
602aa1a
Compare
Motivation
Fixed #17225
Modifications
dataProvider. I split the subscriptions into two separate data provider.pulsar/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SubscriptionMessageDispatchThrottlingTest.java
Lines 467 to 479 in 0517423
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-not-neededMatching PR in forked repository
PR in forked repository: HQebupt#2