fix: Fix flaky test TestProtoConversionUtil#allFieldsSet_wellKnownTyp…#18352
Merged
danny0405 merged 1 commit intoapache:masterfrom Mar 21, 2026
Merged
fix: Fix flaky test TestProtoConversionUtil#allFieldsSet_wellKnownTyp…#18352danny0405 merged 1 commit intoapache:masterfrom
danny0405 merged 1 commit intoapache:masterfrom
Conversation
…esAndTimestampsAsRecords
9506802 to
6b1eef9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18352 +/- ##
============================================
+ Coverage 66.10% 68.42% +2.32%
- Complexity 22301 27402 +5101
============================================
Files 1988 2423 +435
Lines 110007 132458 +22451
Branches 13867 15974 +2107
============================================
+ Hits 72716 90632 +17916
- Misses 31104 34778 +3674
- Partials 6187 7048 +861
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Collaborator
danny0405
approved these changes
Mar 21, 2026
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.
…esAndTimestampsAsRecords
Describe the issue this Pull Request addresses
TestProtoConversionUtil#allFieldsSet_wellKnownTypesAndTimestampsAsRecordscan fail nondeterministically due to random unsigned test data generation.A concrete failure example:
"primitive_unsigned_int": 3514477690"primitive_unsigned_int": -780489606These two values represent the same 32-bit pattern, but one is interpreted as unsigned (
3514477690) and the other as signed (-780489606). Because the test compares full records, this mismatch causes assertion failure.Root cause in test input generation:
primitiveUnsignedIntwas generated viaRANDOM.nextInt()(can be negative).Summary and Changelog
Updated unsigned random data generation in
TestProtoConversionUtil:primitiveUnsignedIntRANDOM.nextInt()Math.abs(RANDOM.nextInt())Impact
Improved determinism and reduced flaky failures.
Risk Level
low.
Documentation Update
Contributor's checklist