kaiyaok2 opened a new pull request #3005:
URL: https://github.com/apache/incubator-shenyu/pull/3005


   **Description**
   2 flaky(possible to fail under different OS's / future Java versions) tests 
are found using Nondex when running commands ```mvn 
edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest={test}``` , where the 2 
tests are `common.utils.GsonUtilsTest.testToJson` and 
`common.utils.JsonUtilsTest.toJson`. The test flakiness is due to direct 
comparisons between Json Strings and outputs from `JsonUtils.toJson()` and 
`GsonUtils.getInstance().toJson()`. However, JsonObject-likes do not guarantee 
orders, and internal permutations may occur in the output from `toJson()`. 
   **Proposed Fixes**
   Using `JsonParser.parse()` to convert string-formed Json's into rigid 
`JsonElement` before direct comparison. Then, the comparsion is made regardless 
of internal element orders.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to