Skip to content
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

Update 2 tests in 'json-serde' to handle String comparison ignoring the order #240

Open
Sujishark opened this issue Nov 23, 2023 · 0 comments

Comments

@Sujishark
Copy link

Describe the bug:

Creating this issue to address 2 tests:

org.openx.data.jsonserde.JsonSerDeTest.testNestedExplicitNullValue
org.openx.data.jsonserde.JsonSerDeTest.testExplicitNullValue

Expected behavior:

The assertion at the above mentioned tests are expected to succeed irrespective of the arrangement of the Strings.

Actual behavior:

Encountered the following errors:

Failed tests: testNestedExplicitNullValue(org.openx.data.jsonserde.JsonSerDeTest): expected:<{"[structCol":{"name":"myName"},"missingStructCol":null],"structNullCol":{"n...> but was:<{"[missingStructCol":null,"structCol":{"name":"myName"}],"structNullCol":{"n...>

Failed tests: testExplicitNullValue(org.openx.data.jsonserde.JsonSerDeTest): expected:<{"[stringCol":"str","nullCol":null],"missingCol":null}> but was:<{"[nullCol":null,"stringCol":"str"],"missingCol":null}>

This was found by using the NonDex tool.

I've a fix ready for this. Can I proceed and create PR ?

How to Reproduce

The following code is for the test - org.openx.data.jsonserde.JsonSerDeTest.testNestedExplicitNullValue:

cd Hive-JSON-Serde
mvn install -pl json-serde -am -DskipTests
mvn -pl json-serde edu.illinois:nondex-maven-plugin:2.1.1:nondex -Dtest=org.openx.data.jsonserde.JsonSerDeTest#testNestedExplicitNullValue

Desktop (please complete the following information):

  • OS: Mac
  • Version: Sonoma 14.0
  • Maven Version: 3.6.3
  • Module: api
  • SDK: Original
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant