BoyuLi4 opened a new pull request, #47: URL: https://github.com/apache/olingo-odata2/pull/47
## What is the purpose of the change In module `odata2-lib/odata-core` test file ``` org.apache.olingo.odata2.core.uri.ExpandSelectTreeCreatorImplTest ``` many tests may have flakiness due to comparisons between two JSON Strings. However, JsonObject does not guarantee entry orders. Its object is an unordered set of name/value pairs, and just using `assertequal `to compare long JSON string may course some problems. ## Brief changelog Since the JSON tool used in the Project is GSON, so I used the GSON library `JsonParser `to convert the string back to JSON Object and compare them. when comparing them, thus the equals() method ignores the order and treats them as equal. ## Verifying this change Use `mvn test` after these changes. ``` [INFO] Running org.apache.olingo.odata2.core.uri.ExpandSelectTreeCreatorImplTest [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 s - in org.apache.olingo.odata2.core.uri.ExpandSelectTreeCreatorImplTest ``` This test avoids nested or different orders of JSON strings that cause flaky errors. Since I didn't touch any Source code, it should be no impact on the project. -- 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: dev-unsubscr...@olingo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org