Skip to content

Commit f2cfd09

Browse files
committed
Remove renewal in retention lease recovery test (#42536)
This commit removes the act of renewing some retention leases during a retention lease recovery test. Having renewal does not add anything extra to this test, but does allow for some situations where the test can fail spuriously (i.e., in a way that does not indicate that production code is broken).
1 parent 5695992 commit f2cfd09

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.elasticsearch.indices.recovery.PeerRecoveryTargetService;
3737
import org.elasticsearch.plugins.Plugin;
3838
import org.elasticsearch.test.ESIntegTestCase;
39-
import org.elasticsearch.test.junit.annotations.TestLogging;
4039
import org.elasticsearch.test.transport.MockTransportService;
4140
import org.elasticsearch.threadpool.ThreadPool;
4241
import org.elasticsearch.transport.TransportService;
@@ -356,7 +355,6 @@ public void testRetentionLeasesBackgroundSyncWithSoftDeletesDisabled() throws Ex
356355
assertFalse("retention leases background sync must be a noop if soft deletes is disabled", backgroundSyncRequestSent.get());
357356
}
358357

359-
@TestLogging(value = "org.elasticsearch.index:debug,org.elasticsearch.indices.recovery:trace")
360358
public void testRetentionLeasesSyncOnRecovery() throws Exception {
361359
final int numberOfReplicas = 2 - scaledRandomIntBetween(0, 2);
362360
internalCluster().ensureAtLeastNumDataNodes(1 + numberOfReplicas);
@@ -393,7 +391,6 @@ public void testRetentionLeasesSyncOnRecovery() throws Exception {
393391
final ActionListener<ReplicationResponse> listener = countDownLatchListener(latch);
394392
currentRetentionLeases.put(id, primary.addRetentionLease(id, retainingSequenceNumber, source, listener));
395393
latch.await();
396-
currentRetentionLeases.put(id, primary.renewRetentionLease(id, retainingSequenceNumber, source));
397394
}
398395
logger.info("finished adding [{}] retention leases", length);
399396

0 commit comments

Comments
 (0)