Skip to content

Commit

Permalink
Wait for events in waitForRelocation
Browse files Browse the repository at this point in the history
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 elastic#44433
Fixes elastic#45003
  • Loading branch information
DaveCTurner committed Aug 1, 2019
1 parent d9b2d8d commit 95af91a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 95af91a

Please sign in to comment.