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

   ### Steps to Reproduce
   
   The tests **`should_encode_register_type`** and 
**`should_encode_unregister_type`** in module  
   `service-registry/registry-lightweight` serialize message objects into 
pretty-printed JSON strings and compare them against hard-coded expected 
outputs.
   
   However, JSON serialization may emit keys in a non-deterministic order 
depending on the underlying `Map` implementation or Jackson configuration 
(e.g., `MapperFeature.SORT_PROPERTIES_ALPHABETICALLY`, field declaration order, 
or JDK hash iteration order). When key order differs from the expected literal 
string, these assertions fail intermittently.
   
   To reproduce nondeterministically, run NonDex on the test class or on a 
higher-level suite that includes these tests. For example:
   
   ```bash
   mvn -pl service-registry/registry-lightweight   
edu.illinois:nondex-maven-plugin:2.1.7:nondex   
-Dtest=-Dtest=org.apache.servicecomb.registry.lightweight.MessageTest#should_encode_register_type
   ```
   
   ### Expected Behavior
   
   The tests should **consistently pass**, regardless of key ordering in the 
serialized JSON output.
   
   ### Servicecomb Version
   
   3.3.0
   
   ### Additional Context
   
   I have prepared a fix in a pull request, which I will mention in the comment 
session.


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