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

[Backport 2.x] Fix flaky test SegmentReplicationTargetServiceTests#testShardAlreadyReplicating #13265

Merged
merged 1 commit into from
Apr 17, 2024

Commits on Apr 17, 2024

  1. Fix flaky test SegmentReplicationTargetServiceTests#testShardAlreadyR…

    …eplicating (opensearch-project#13248)
    
    This test is flaky because it is incorrectly passing a checkpoint with a higher primary term on the second invocation.
    This will cancel the first replication and start another.  The test sometimes passes because it is only asserting on processLatestReceivedCheckpoint.
    If the cancellation quickly completes before attempting second replication event the test will fail, otherwise it will pass.
    
    Fixed this test by ensuring the pterm is the same, but the checkpoint is ahead.  Also added assertion that replication is not started with the exact ahead checkpoint
    instead of only processLatestReivedCheckpoint. Tests already exist for ahead primary term "testShardAlreadyReplicating_HigherPrimaryTermReceived".
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    (cherry picked from commit 1fcb79d)
    mch2 committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    15c5baf View commit details
    Browse the repository at this point in the history