alibaba / fastjson2

🚄 FASTJSON2 is a Java JSON library with excellent performance.
Apache License 2.0
3.79k stars 495 forks source link

[BUG] Found 2 Flaky tests in JsonManagedReferenceTest.java #3094

Closed Mukta13 closed 1 month ago

Mukta13 commented 1 month ago

Problem Description

Found 2 flaky tests in the file: JsonManagedReferenceTest.java

The tests that were flaky within this file were: testJsonBackReference() and test1().

Environment Info:

Steps to reproduce

Run these commands:

mvn -pl core edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=com.alibaba.fastjson2.jackson_support.JsonManagedReferenceTest#testJsonBackReference

mvn -pl core edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=com.alibaba.fastjson2.jackson_support.JsonManagedReferenceTest#test1

The results would be:

image

Expected Results

The tests should run without non-determinism issue and the build should be successful after running the above commands

Relevant log output

image

Mukta13 commented 1 month ago

Fix in https://github.com/alibaba/fastjson2/pull/3107