You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/11/30 07:17:05 UTC

[GitHub] [shardingsphere] aditya-kumbhar opened a new pull request, #22526: Use gson JSONParser for asserting JSON equality deterministically

aditya-kumbhar opened a new pull request, #22526:
URL: https://github.com/apache/shardingsphere/pull/22526

   Fixes #22518.
   
   Changes proposed in this pull request:
     -
   The flakiness of the tests is because Json objects are being compared and the ordering of the elements in the generated json strings may not be deterministic.
   Using the gson [JsonParser](https://stackoverflow.com/questions/2253750/testing-two-json-objects-for-equality-ignoring-child-order-in-java/9065247#9065247).parseString(), the json strings are converted to json parse trees. 
   
   The generated parse trees are then compared for equality in the assertions, ignoring the order of the child elements. 
   The tests pass using [NonDex](https://github.com/TestingResearchIllinois/NonDex) after this change.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] terrymanu merged pull request #22526: Use gson JSONParser for asserting JSON equality deterministically

Posted by GitBox <gi...@apache.org>.
terrymanu merged PR #22526:
URL: https://github.com/apache/shardingsphere/pull/22526


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org