Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hofi1 opened this issue Oct 5, 2023 · 0 comments · Fixed by #2663 · May be fixed by hofi1/helix#4
Labels
bug Something isn't working

Comments

@hofi1
Copy link
Contributor

hofi1 commented Oct 5, 2023

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.

@hofi1 hofi1 added the bug Something isn't working label Oct 5, 2023
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 5, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 5, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 13, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 13, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 13, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 13, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 13, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
hofi1 pushed a commit to hofi1/helix that referenced this issue Oct 13, 2023
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
junkaixue pushed a commit that referenced this issue Feb 27, 2024
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment

Co-authored-by: simonh5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant