From a3837786ec73a7d2333aab199b1fa3eb454c5d9e Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Fri, 20 Dec 2019 11:48:09 +0100 Subject: [PATCH] Fix testAutoExpandIndicesDuringRollingUpgrade (#50361) Follow-up to #50361 that fixes the test that does not work against older ES versions --- .../src/test/java/org/elasticsearch/upgrades/RecoveryIT.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java index bc4ce56fa72..35cde43fcff 100644 --- a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java +++ b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java @@ -789,8 +789,10 @@ public class RecoveryIT extends AbstractRollingTestCase { .put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, randomInt(2)) .put(IndexMetaData.SETTING_AUTO_EXPAND_REPLICAS, "0-all") - .put(IndexMetaData.INDEX_ROUTING_EXCLUDE_GROUP_PREFIX + "._id", nodes.get(randomInt(2))) .build()); + ensureGreen(indexName); + updateIndexSettings(indexName, + Settings.builder().put(IndexMetaData.INDEX_ROUTING_EXCLUDE_GROUP_PREFIX + "._id", nodes.get(randomInt(2)))); } ensureGreen(indexName);