Wait for events in waitForRelocation (#45074)

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
This commit is contained in:
David Turner 2019-08-01 13:45:52 +01:00
parent 6c87845fc1
commit c088bafbbc
2 changed files with 1 additions and 2 deletions

View File

@ -181,7 +181,6 @@ public class FilteringAllocationIT extends ESIntegTestCase {
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<String> nodes = internalCluster().startNodes(6);
Set<String> excludeNodes = new HashSet<>(nodes.subList(0, 3));

View File

@ -938,7 +938,7 @@ public abstract class ESIntegTestCase extends ESTestCase {
* 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);
}