From 142b10604eac2161cfd5be6d94c2e64a662fa635 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Wed, 18 Sep 2019 13:22:55 +0200 Subject: [PATCH] Fix testHistoryRetention (#46799) (#46805) Suppress the reasonable-history check in this test to guarantee we're always getting ops based recovery even after a background sync. Closes #45953 Co-Authored-By: David Turner --- .../org/elasticsearch/indices/recovery/IndexRecoveryIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java b/server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java index ae7d6f071839..e7277450e6b3 100644 --- a/server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java @@ -863,7 +863,8 @@ public void testHistoryRetention() throws Exception { final String indexName = "test"; client().admin().indices().prepareCreate(indexName).setSettings(Settings.builder() .put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) - .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 2)).get(); + .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 2) + .put(IndexSettings.FILE_BASED_RECOVERY_THRESHOLD_SETTING.getKey(), 1.0)).get(); ensureGreen(indexName); // Perform some replicated operations so the replica isn't simply empty, because ops-based recovery isn't better in that case