You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "anthonyx24 (via GitHub)" <gi...@apache.org> on 2025/10/01 03:50:09 UTC

[I] [BUG] - Nondeterminism in unit test TestInvocationPublishModelFactory [servicecomb-java-chassis]

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

   ### Steps to Reproduce
   
   The method `createDefaultPublishModel()` in `TestInvocationPublishModelFactory` compares JSONs to verify that the default object is properly created. However, since JSONs are unordered collections, when converted to strings the parameter order may not be preserved. This test uses a hard-coded JSON string as the expected correct value, but the test could fail if the parameters from the test object are stringified in a different order than the expected string. For another example of this issue being addressed, see this [previous merged PR](https://github.com/apache/servicecomb-java-chassis/pull/4633).
   
   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, you can run:
   
   ```
   mvn -pl metrics/metrics-core edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest="org.apache.servicecomb.metrics.core.publish.TestInvocationPublishModelFactory#createDefaultPublishModel"
   ```
   
   ### Expected Behavior
   
   _No response_
   
   ### Servicecomb Version
   
   3.3.0
   
   ### Additional Context
   
   I have a potential fix in a PR, I'll be adding 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: commits-unsubscribe@servicecomb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] - Nondeterminism in unit test TestInvocationPublishModelFactory [servicecomb-java-chassis]

Posted by "anthonyx24 (via GitHub)" <gi...@apache.org>.
anthonyx24 commented on issue #4946:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4946#issuecomment-3354628365

   PR for this issue: https://github.com/apache/servicecomb-java-chassis/pull/4947


-- 
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-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] - Nondeterminism in unit test TestInvocationPublishModelFactory due to JSON parameter ordering [servicecomb-java-chassis]

Posted by "SweetWuXiaoMei (via GitHub)" <gi...@apache.org>.
SweetWuXiaoMei closed issue #4946: [BUG] - Nondeterminism in unit test TestInvocationPublishModelFactory due to JSON parameter ordering
URL: https://github.com/apache/servicecomb-java-chassis/issues/4946


-- 
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-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org