Closed
Description
Describe the bug
The test org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment is flaky. The JSON strings in the assertion can change and sometime not pass the assertions.
JSON may change the order of the elements in arrays as well as elements on the same level – this leads to the flaky test.
To Reproduce
mvn -pl helix-rest edu.illinois:nondex-maven-plugin:2.1.1:nondex -Dtest=org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment
Expected behavior
Test should not be flaky – it should pass or fail (in the current case it should pass)
Additional context
Change the assertions from JUNIT-Assertions to JSONAssertions.