anthonyx24 opened a new issue, #4970:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4970

   ### Steps to Reproduce
   
   **Issue:** This is the same issue as #4946  involving JSON comparisons. Here 
it's happening in both the `should_encode_register_type` and 
`should_encode_unregister_type` unit tests within the `MessageTest` class. In 
summary, since JSONs are unordered, after converting them to strings, the 
parameter ordering is not guaranteed, which can lead to the tests failing 
occasionally. For another example of this issue being addressed, see this 
[previous merged 
PR](https://github.com/apache/servicecomb-java-chassis/pull/4633).
   
   These two tests were flagged via the 
[NonDex](https://github.com/TestingResearchIllinois/NonDex) tool, which detects 
potentially unreliable tests due to underlying Java API assumptions. To see the 
Nondex output for the test class `MessageTest`, you can run:
   
   ```
   mvn -pl service-registry/registry-lightweight 
edu.illinois:nondex-maven-plugin:2.1.7:nondex 
-Dtest="org.apache.servicecomb.registry.lightweight.MessageTest"
   ```
   
   ### Expected Behavior
   
   The tests should pass regardless of which order the JSON parameters are 
stringified.
   
   ### Servicecomb Version
   
   3.3.0
   
   ### Additional Context
   
   I will add a PR with a potential fix in the discussion.


-- 
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