-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-28603 Fixing Multiple Flaky tests in module serde which are due to non determinism #5527
Merged
difin
merged 4 commits into
apache:master
from
nikunjagarwal321:HIVE-28603-fix-flaky-tests-serde
Nov 12, 2024
Merged
HIVE-28603 Fixing Multiple Flaky tests in module serde which are due to non determinism #5527
difin
merged 4 commits into
apache:master
from
nikunjagarwal321:HIVE-28603-fix-flaky-tests-serde
Nov 12, 2024
Conversation
This file contains 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
difin
reviewed
Nov 9, 2024
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
Outdated
Show resolved
Hide resolved
asf-ci-hive
added
tests passed
tests pending
and removed
tests pending
tests passed
labels
Nov 9, 2024
difin
reviewed
Nov 9, 2024
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
Show resolved
Hide resolved
LGTM, +1. |
asf-ci-hive
added
tests pending
tests unstable
and removed
tests passed
tests pending
labels
Nov 9, 2024
nikunjagarwal321
force-pushed
the
HIVE-28603-fix-flaky-tests-serde
branch
from
November 9, 2024 23:19
5129bf7
to
f835f23
Compare
nikunjagarwal321
force-pushed
the
HIVE-28603-fix-flaky-tests-serde
branch
from
November 9, 2024 23:43
f835f23
to
7cadc8e
Compare
asf-ci-hive
added
tests failed
tests pending
and removed
tests pending
tests failed
labels
Nov 9, 2024
asf-ci-hive
added
tests unstable
tests pending
tests failed
and removed
tests unstable
tests pending
labels
Nov 10, 2024
@nikunjagarwal321 please retrigger the build, it needs to pass |
nikunjagarwal321
force-pushed
the
HIVE-28603-fix-flaky-tests-serde
branch
from
November 10, 2024 22:54
061cd82
to
efe8288
Compare
Quality Gate passedIssues Measures |
Thanks @difin ! |
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.
What changes were proposed in this pull request?
Sorting the fields in function
getDeclaredNonStaticFields()
in ObjectInspectorUtils.java class in order to make the function deterministic. The below flaky tests will be fixed by this.Why are the changes needed?
Multiple flaky tests were detected in serde module while trying to run the tests using the nondex tool. NonDex is a tool for detecting and debugging wrong assumptions on under-determined Java APIs.
Steps to reproduce flakiness using nondex -
ERROR logs:
Reason for Failure
The method getDeclaredNonStaticFields(Class<?> c) in class ObjectInspectorUtils.java uses class.getDeclaredFields() method which is nondeterministic as per java docs.
Field[] f = c.getDeclaredFields();
As per the test cases, it is assumed that the return order of the fields will always be the same, which may not be the case.
All the below test cases are impacted because of the same reason :
Does this PR introduce any user-facing change?
No
Is the change a dependency upgrade?
No
How was this patch tested?
The changes were tested by running the unit tests locally. The code is already covered in the above test cases and is actually fixing the flaky tests.
Please let me know if you have any questions or would like to discuss this further for any clarificaitions.