Closed
Description
Describe the bug
Unit test OngoingSegmentReplicationsTests.testMultipleReplicasUseSameCheckpoint
fails intermittenly on gradle check.
REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone" -Dtests.seed=18F9CB5CD66407EA -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ms -Dtests.timezone=Europe/Sofia -Druntime.java=17
org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testReplicationOnDone FAILED
org.mockito.exceptions.verification.TooFewActualInvocations:
segmentReplicationTargetService.onNewCheckpoint(
ReplicationCheckpoint{shardId=[index][0], primaryTerm=94, segmentsGen=3, seqNo=-1, version=9},
<any>
);
Wanted 2 times:
-> at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:236)
But was 1 time:
-> at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:230)
at __randomizedtesting.SeedInfo.seed([18F9CB5CD66407EA:2371B911C98E848]:0)
at app//org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:236)
To Reproduce
Steps to reproduce the behavior:
- Run above test continuously, it may fail with above error.
Expected behavior
Test should not fail