Skip to content

[BUG] - Nondeterminism in unit test within HighwayServerCodecFilterTest due to JSON parameter ordering #4987

@anthonyx24

Description

@anthonyx24

Steps to Reproduce

Similar to #4970 , the unit test should_convert_exception_to_response_when_decode_request_failed within HighwayServerCodecFilterTest compares JSON strings nondeterministically. 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.

This test was flagged via the NonDex tool, which detects potentially unreliable tests due to underlying Java API assumptions. To see the Nondex output for HighwayServerCodecFilterTest, you can run:

mvn -pl transports/transport-highway edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest="org.apache.servicecomb.transport.highway.HighwayServerCodecFilterTest"

Expected Behavior

No response

Servicecomb Version

3.3.0

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions