fixed compile error

This commit is contained in:
Martijn van Groningen 2013-09-20 15:30:05 +02:00
parent 846b833539
commit be2acaa629
1 changed files with 7 additions and 1 deletions

View File

@ -52,7 +52,6 @@ import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilde
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.*; import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.percolator.PercolatorTests.convertFromTextArray; 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.elasticsearch.test.hamcrest.ElasticSearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.*; import static org.hamcrest.Matchers.*;
@ -460,4 +459,11 @@ public class RecoveryPercolatorTests extends AbstractNodesTests {
assertThat(error.get(), nullValue()); 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));
}
} }