From 95af91a3713e05ad23328680bf7b3f1f821351d9 Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 1 Aug 2019 08:43:19 +0100 Subject: [PATCH 1/2] Wait for events in waitForRelocation Adds a `waitForEvents(Priority.LANGUID)` to the cluster health request in `ESIntegTestCase#waitForRelocation()` to deal with the case that this health request returns successfully despite the fact that there is a pending reroute task which will relocate another shard. Relates #44433 Fixes #45003 --- .../src/main/java/org/elasticsearch/test/ESIntegTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index 48d7d6a1a75e4..f844e88474230 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -900,7 +900,7 @@ public ClusterHealthStatus waitForRelocation() { * using the cluster health API. */ public ClusterHealthStatus waitForRelocation(ClusterHealthStatus status) { - ClusterHealthRequest request = Requests.clusterHealthRequest().waitForNoRelocatingShards(true); + ClusterHealthRequest request = Requests.clusterHealthRequest().waitForNoRelocatingShards(true).waitForEvents(Priority.LANGUID); if (status != null) { request.waitForStatus(status); } From 3dd329e629871f169edc7c7e3e8ab64ec727141a Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 1 Aug 2019 08:55:47 +0100 Subject: [PATCH 2/2] Remove AwaitsFix --- .../elasticsearch/cluster/allocation/FilteringAllocationIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java b/server/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java index 439dcd42ed0f8..93bdd674180bf 100644 --- a/server/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java +++ b/server/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java @@ -181,7 +181,6 @@ public void testInvalidIPFilterClusterSettings() { assertEquals("invalid IP address [192.168.1.1.] for [" + filterSetting.getKey() + ipKey + "]", e.getMessage()); } - @AwaitsFix( bugUrl = "https://github.com/elastic/elasticsearch/issues/45003") public void testTransientSettingsStillApplied() { List nodes = internalCluster().startNodes(6); Set excludeNodes = new HashSet<>(nodes.subList(0, 3));