-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-28603 Fixing Multiple Flaky tests in module serde which are due to non determinism #5527
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
Conversation
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
Outdated
Show resolved
Hide resolved
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
Show resolved
Hide resolved
LGTM, +1. |
5129bf7
to
f835f23
Compare
f835f23
to
7cadc8e
Compare
|
Thanks @difin ! |
@nikunjagarwal321 Hi, It appears that this commit does not work with JDK 17 and has resulted in multiple test failures. Could you please check this issue? You can check out the PR here: #5404 |
Hey, I see that the transition to Java 17 is a new initiative you're working on. If the previous changes are not fully compatible with Java 17, we may need to explore alternative approaches. I’d be happy to provide more context on my changes or collaborate on finding a resolution. Let’s continue the discussion in the new PR where the Java 17 upgrade is being worked on, as this change seems primarily related to the version upgrade and keeping all discussions in one place would be helpful. |
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
…are due to non determinism (apache#5527)" This reverts commit 41925d7.
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.