[AMORO-3853] Stabilize continuous optimizing tests on Java 17#4142
Merged
xxubai merged 4 commits intoapache:masterfrom Apr 2, 2026
Merged
[AMORO-3853] Stabilize continuous optimizing tests on Java 17#4142xxubai merged 4 commits intoapache:masterfrom
xxubai merged 4 commits intoapache:masterfrom
Conversation
zhoujinsong
approved these changes
Apr 2, 2026
Contributor
zhoujinsong
left a comment
There was a problem hiding this comment.
The fix is correct — the root cause is that randomRecord() was creating a new Random() on every call, completely bypassing the seed passed to the constructor. The other changes (UUID generation, fixed base timestamps) are also necessary to achieve full determinism.
Minor nit: truncatedTo(ChronoUnit.MICROS) after .plusNanos(random.nextInt(1_000_000) * 1_000L) is redundant since the result is already microsecond-aligned. Not a blocker.
LGTM.
Contributor
Author
|
Thanks @zhoujinsong |
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.
Why are the changes needed?
Some continuous optimizing tests are unstable on Java 17 due to non-deterministic test data generation and missing test build configuration for generated sources.
Follow #3853.
Brief change log
RandomRecordGeneratordeterministic for the affected test flowssrc/main/gen-java/**from checkstyle inamoro-commonamoro-commonfor test executionHow was this patch tested?
Local verification:
./mvnw -pl amoro-ams -am -Dtest=TestKeyedContinuousOptimizing,TestUnKeyedContinuousOptimizing testDocumentation