Skip to content

flaky test assertions in org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment #2640

Closed
hofi1/helix
#4
@hofi1

Description

@hofi1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions