[fix][flaky-test]Fix PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest.testMultiLevelDispatch#17389
[fix][flaky-test]Fix PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest.testMultiLevelDispatch#17389HQebupt wants to merge 4 commits intoapache:masterfrom
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.
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.
I agree with you. The longer the time, the more accurate the rate.
There was a problem hiding this comment.
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.
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.
Why is this assertion so certain, it may cause the test to become more unstable
…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