Fix version in testTurnOffTranslogRetentionAfterAllShardStarted

Soft-deletes requires 6.5 or later.
This commit is contained in:
Nhat Nguyen 2019-12-15 12:57:54 -05:00
parent a0044df78a
commit 6f1098cceb
1 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@
package org.elasticsearch.index.replication; package org.elasticsearch.index.replication;
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.action.support.PlainActionFuture;
import org.elasticsearch.action.support.replication.ReplicationResponse; import org.elasticsearch.action.support.replication.ReplicationResponse;
@ -151,7 +152,8 @@ public class RetentionLeasesReplicationTests extends ESIndexLevelReplicationTest
public void testTurnOffTranslogRetentionAfterAllShardStarted() throws Exception { public void testTurnOffTranslogRetentionAfterAllShardStarted() throws Exception {
final Settings.Builder settings = Settings.builder().put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true); final Settings.Builder settings = Settings.builder().put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true);
if (randomBoolean()) { if (randomBoolean()) {
settings.put(IndexMetaData.SETTING_VERSION_CREATED, VersionUtils.randomIndexCompatibleVersion(random())); settings.put(IndexMetaData.SETTING_VERSION_CREATED,
VersionUtils.randomVersionBetween(random(), Version.V_6_5_0, Version.CURRENT));
} }
try (ReplicationGroup group = createGroup(between(1, 2), settings.build())) { try (ReplicationGroup group = createGroup(between(1, 2), settings.build())) {
group.startAll(); group.startAll();