Enable soft deletes in RetentionLeaseIT

Relates #39922
This commit is contained in:
Nhat Nguyen 2019-03-11 22:10:23 -04:00
parent 2f47e3d05a
commit bf814357ad
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,7 @@ public class RetentionLeaseIT extends ESIntegTestCase {
final Settings settings = Settings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", numberOfReplicas)
.put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
.build();
createIndex("index", settings);
ensureGreen("index");
@ -433,6 +434,7 @@ public class RetentionLeaseIT extends ESIntegTestCase {
final Settings settings = Settings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0)
.put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
.put(IndexService.RETENTION_LEASE_SYNC_INTERVAL_SETTING.getKey(), TimeValue.timeValueSeconds(1))
.build();
assertAcked(prepareCreate("index").setSettings(settings));
@ -552,6 +554,7 @@ public class RetentionLeaseIT extends ESIntegTestCase {
final Settings settings = Settings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", numDataNodes)
.put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
.put(IndexService.RETENTION_LEASE_SYNC_INTERVAL_SETTING.getKey(), TimeValue.timeValueSeconds(1))
.build();
assertAcked(prepareCreate("index").setSettings(settings));