diff --git a/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java b/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java index 5387cbb985c..847a4c980e1 100644 --- a/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java +++ b/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java @@ -52,7 +52,6 @@ import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilde import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.index.query.QueryBuilders.*; import static org.elasticsearch.percolator.PercolatorTests.convertFromTextArray; -import static org.elasticsearch.percolator.TTLPercolatorTests.ensureGreen; import static org.elasticsearch.test.hamcrest.ElasticSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.*; @@ -460,4 +459,11 @@ public class RecoveryPercolatorTests extends AbstractNodesTests { assertThat(error.get(), nullValue()); } + public static void ensureGreen(Client client) { + ClusterHealthResponse actionGet = client.admin().cluster() + .health(Requests.clusterHealthRequest().waitForGreenStatus().waitForEvents(Priority.LANGUID).waitForRelocatingShards(0)).actionGet(); + assertThat(actionGet.isTimedOut(), equalTo(false)); + assertThat(actionGet.getStatus(), equalTo(ClusterHealthStatus.GREEN)); + } + }