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

fix: fix flaky test assertions in org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hofi1
Copy link
Owner

@hofi1 hofi1 commented Oct 3, 2023

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

Fixes apache#2640

Description

The problem in this test is, that a json string gets directly asserted. JSON strings are equal, if it has the same content and structure. Not only the elements in the arrays can change, but also the elements in the same object can change place. This is not considered in the assertion and leads to a flaky test.

This problem was found by the NonDex Engine – to reproduce run

mvn -pl helix-rest edu.illinois:nondex-maven-plugin:2.1.1:nondex -Dtest=org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment

Tests

No test have been written – one existing test has been updated.

  • The following is the result of the "mvn test" command on the appropriate module:
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:53 min
    [INFO] Finished at: 2023-10-04T18:42:54-05:00

@hofi1 hofi1 force-pushed the fix/fix-flaky-test-org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment branch 2 times, most recently from ed8daee to 489a70a Compare October 5, 2023 04:22
@hofi1 hofi1 force-pushed the fix/fix-flaky-test-org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment branch from e9c962a to 915e414 Compare October 13, 2023 16:35
in test TestResourceAssignmentOptimizerAccessor
#testComputePartitionAssignment
@hofi1 hofi1 force-pushed the fix/fix-flaky-test-org.apache.helix.rest.server.TestResourceAssignmentOptimizerAccessor#testComputePartitionAssignment branch from 6e8eb21 to eb11210 Compare October 13, 2023 16:38
@zzjas
Copy link

zzjas commented Oct 17, 2023

You can consider if it makes sense to combine some of your PRs for helix into a larger one.

You can proceed to open a real PR. Once you open a real PR, please mark this tentative PR as Opened in your tentative_pr.csv file and also raise a PR to IDoFT marking this as Opened. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants