There were 2 non deterministic tests that were changed using a simple fix. The code compares the deserialization of two JSON strings (jsonJackson and jsonFastjson2) into Map<String, Object> objects using the mapper.readValue() method. Once both JSON strings are converted into maps, the assertEquals() method is used to check if the two resulting maps are identical. This ensures that the JSON content from both sources is equivalent, regardless of the order.
Please indicate you've done the following:
[ Yes] Made sure tests are passing and test coverage is added if needed.
What this PR does / why we need it?
This is a fix for this flaky test issue:
https://github.com/alibaba/fastjson2/issues/3094
Summary of your change
There were 2 non deterministic tests that were changed using a simple fix. The code compares the deserialization of two JSON strings (jsonJackson and jsonFastjson2) into Map<String, Object> objects using the mapper.readValue() method. Once both JSON strings are converted into maps, the assertEquals() method is used to check if the two resulting maps are identical. This ensures that the JSON content from both sources is equivalent, regardless of the order.
Please indicate you've done the following: