This repository was archived by the owner on Oct 23, 2024. It is now read-only.
Fixing flaky test in MaxBufSizeTest#2291
Open
OrDTesters wants to merge 3020 commits intoalibaba:masterfrom
Open
Fixing flaky test in MaxBufSizeTest#2291OrDTesters wants to merge 3020 commits intoalibaba:masterfrom
OrDTesters wants to merge 3020 commits intoalibaba:masterfrom
Conversation
Improve performance by using StringBuilder instead of StringBuffer.
Performance issue when handling strings
modify the copiright year in the readme file
修复JSON解析异常时错误的提示信息:拼写错误
For compatibility with jsr311-api.
Update license year range to 2018
Codecov Report
@@ Coverage Diff @@
## master #2291 +/- ##
=========================================
Coverage ? 81.51%
Complexity ? 7029
=========================================
Files ? 143
Lines ? 26183
Branches ? 6262
=========================================
Hits ? 21344
Misses ? 3040
Partials ? 1799Continue to review full report at Codecov.
|
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #2291 +/- ##
============================================
- Coverage 81.54% 81.51% -0.03%
+ Complexity 7045 7029 -16
============================================
Files 143 143
Lines 26225 26183 -42
Branches 6274 6262 -12
============================================
- Hits 21386 21344 -42
- Misses 3039 3040 +1
+ Partials 1800 1799 -1
Continue to review full report at Codecov.
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The test test_max_buf in MaxBufSizeTest fails when run after SerializeWriterTest_14. The reason is that tests in SerializeWriterTest_14 create SerializeWriter instances of size 1, and the buffer for those instances are cached. When test_max_buf makes a new SerializeWriter instance, it reuses the prior buffer of size 1, and the later call to
writer.setMaxBufSize(1)does not throw an exception as expected.The proposed fix is to have test_max_buf purposely create a valid SerializeWriter, of size 2, such that it is guaranteed for the later exception to be thrown.