From 4518f8436b96b353efc6377482174b81dfbb827b Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 7 Apr 2021 15:04:55 +0100 Subject: [PATCH] Wait on relocation in UpdateSettingsIT#testNoopUpdate (#71401) This test works by capturing the applied cluster state and verifying that it does not change as no-op updates are applied. However the captured cluster state might contain some ongoing relocations which subsequently finish, causing an unexpected cluster state update. This commit fixes that by waiting for any ongoing relocations too. Relates #61348 Closes #70961 --- .../org/elasticsearch/indices/settings/UpdateSettingsIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java index 1db0ad71f80da..025164a2514ba 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java @@ -691,6 +691,7 @@ public void testNoopUpdate() { client().admin().cluster().prepareHealth() .setWaitForGreenStatus() .setWaitForNoInitializingShards(true) + .setWaitForNoRelocatingShards(true) .setWaitForEvents(Priority.LANGUID) .setTimeout(TimeValue.MAX_VALUE) .get();