Repository navigation
[fix][test] Fix testMaxPendingChunkMessages - #18655
Merged
Merged
Conversation
Motivation The `testMaxPendingChunkMessages` is flaky. This PR use another approach to test the maxPendingChunkMessages configuration. Modification * Fix `testMaxPendingChunkMessages` Signed-off-by: Zike Yang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #18655 +/- ##
============================================
- Coverage 47.51% 46.78% -0.74%
- Complexity 10520 10962 +442
============================================
Files 698 758 +60
Lines 68079 72820 +4741
Branches 7280 7809 +529
============================================
+ Hits 32351 34066 +1715
- Misses 32151 34957 +2806
- Partials 3577 3797 +220
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Contributor
|
@RobertIndie Could you please add an explanation of why the old test of flaky? It will help reviewers to understand what is the test issue that we want to resolve |
Member
Author
@codelipenghui Sure. I added the root cause of the flaky test in the PR description. PTAL. |
codelipenghui
approved these changes
Nov 29, 2022
Technoboy-
approved these changes
Dec 2, 2022
lifepuzzlefun
pushed a commit
to lifepuzzlefun/pulsar
that referenced
this pull request
Jan 10, 2023
Signed-off-by: Zike Yang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #18570
Motivation
The
testMaxPendingChunkMessagesis flaky. This PR use another approach to test the maxPendingChunkMessages configuration.Root cause of this flaky test
The original test is a probability test, and it can only succeed with a certain probability. It simulates 25 producers writing to a topic with large messages, each with 5 chunks concurrently. Only if one of these chunked messages appears interleaved will it cause message loss and make the test pass. The success of the test is asserted by the loss of at least one message. The result of the test on my local machine is that only 2 out of 25 messages are lost. So the probability of failure of this test is still relatively high.
Therefore, I choose another approach to rewrite the test and make it deterministic by sending each single chunk manually.
Modifications
testMaxPendingChunkMessagesDoes this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: