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

   ### Steps to Reproduce
   
   The test `should_include_code_in_json_when_code_is_not_null` in 
`CommonExceptionDataTest` from module 
`swagger/swagger-invocation/invocation-core` is flaky. It compares the exact 
JSON string output, which can vary in key order when serialized from a Map or 
object without guaranteed ordering. Different JVMs or JSON libraries may 
produce a map with different key order, causing intermittent failures even 
though the data is semantically identical.
   
   This test was 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 this test, run:
   
   ```
   mvn -pl swagger/swagger-invocation/invocation-core 
edu.illinois:nondex-maven-plugin:2.1.7:nondex 
-Dtest=org.apache.servicecomb.swagger.invocation.exception.CommonExceptionDataTest#should_include_code_in_json_when_code_is_not_null
   ```
   
   ### Expected Behavior
   
   The test should pass for map with semantically identical data but different 
key order.
   
   ### Servicecomb Version
   
   3.3.0
   
   ### Additional Context
   
   I have a potential fix in a PR, and I'll add that to 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