diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/RecoverySourceHandlerTests.java b/server/src/test/java/org/elasticsearch/indices/recovery/RecoverySourceHandlerTests.java index c84341c2620..0912c039c72 100644 --- a/server/src/test/java/org/elasticsearch/indices/recovery/RecoverySourceHandlerTests.java +++ b/server/src/test/java/org/elasticsearch/indices/recovery/RecoverySourceHandlerTests.java @@ -245,7 +245,9 @@ public class RecoverySourceHandlerTests extends ESTestCase { public void indexTranslogOperations(List operations, int totalTranslogOps, long timestamp, long msu, RetentionLeases retentionLeases, long mappingVersion, ActionListener listener) { shippedOps.addAll(operations); - checkpointOnTarget.set(randomLongBetween(checkpointOnTarget.get(), Long.MAX_VALUE)); + if (randomBoolean()) { + checkpointOnTarget.addAndGet(between(1, 20)); + } listener.onResponse(checkpointOnTarget.get()); } };