pem70 opened a new issue, #4966: URL: https://github.com/apache/servicecomb-java-chassis/issues/4966
### Steps to Reproduce ## Steps to Reproduce The method `testSchemaMethod()` in `TestSwaggerUtils` calls a unit-test function that compares pretty-printed YAML strings to verify correctness. However, since YAML serialization relies on iteration order of `Map`/`Set`, the key order in the output can vary. This test uses a hard-coded YAML string as the expected value, but the test fails intermittently if the keys are emitted in a different order than expected. This test was flagged via the **NonDex** tool, which detects potentially unreliable tests caused by hidden assumptions in Java API ordering. To see the NonDex output for this test, you can run: ```bash mvn -pl swagger/swagger-generator/generator-core edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.apache.servicecomb.swagger.generator.core.TestSwaggerUtils#testSchemaMethod ``` ## Expected Behavior The test should consistently pass, regardless of key ordering in the serialized YAML. ## ServiceComb Version 3.3.0 ## Additional Context I have prepared a fix in a pull request. The approach parses both expected and actual YAML into JSON trees and compares them structurally, eliminating the ordering issue. I’ll be adding that PR to the discussion. ### Expected Behavior _No response_ ### Servicecomb Version 3.3.0 ### Additional Context _No response_ -- 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: commits-unsubscr...@servicecomb.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org