-
Notifications
You must be signed in to change notification settings - Fork 280
Description
I encountered a potential flaky test when running the following command: mvn edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=org.everit.json.schema.ObjectSchemaTest#toStringWithUnprocessedProps -DfailIfNoTests=false
The test toStringWithUnprocessedProps fails intermittently because it uses the sameJsonAs function, which ultimately relies on deepEqualArrays to compare JSON objects. This function enforces strict order of elements in the JSON arrays. As a result, this test is prone to failure when the order of elements is altered, even if the content is otherwise valid.
Suggested Fix:
I propose switching the JSON comparison in this test to use JSONAssert, which is more tolerant of ordering differences in JSON arrays while still ensuring the content is correct. This should resolve the flaky behavior and make the test more reliable across different runs.
I will submit a pull request to apply this change. Let me know if any further details are needed.