Fix random params in testSoftDeletesRetentionLock (#38114)
Since #37992 the retainingSequenceNumber is initialized with 0 while the global checkpoint can be -1. Relates #37992
This commit is contained in:
parent
291c4e7a0c
commit
a8ebe2a217
|
@ -74,7 +74,7 @@ public class SoftDeletesPolicyTests extends ESTestCase {
|
|||
// Advances the global checkpoint and the local checkpoint of a safe commit
|
||||
globalCheckpoint.addAndGet(between(0, 1000));
|
||||
for (final AtomicLong retainingSequenceNumber : retainingSequenceNumbers) {
|
||||
retainingSequenceNumber.set(randomLongBetween(retainingSequenceNumber.get(), globalCheckpoint.get()));
|
||||
retainingSequenceNumber.set(randomLongBetween(retainingSequenceNumber.get(), Math.max(globalCheckpoint.get(), 0L)));
|
||||
}
|
||||
safeCommitCheckpoint = randomLongBetween(safeCommitCheckpoint, globalCheckpoint.get());
|
||||
policy.setLocalCheckpointOfSafeCommit(safeCommitCheckpoint);
|
||||
|
|
Loading…
Reference in New Issue