added a waitForGreen condition for the unmapped tests on missing agg

This commit is contained in:
uboness 2013-11-24 20:26:12 +01:00
parent 8fda8aaabf
commit 28adbd475d
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,8 @@ public class MissingTests extends ElasticsearchIntegrationTest {
@Test
public void unmapped() throws Exception {
client().admin().cluster().prepareHealth("unmapped_idx").setWaitForYellowStatus().execute().actionGet();
SearchResponse response = client().prepareSearch("unmapped_idx")
.addAggregation(missing("missing_tag").field("tag"))
.execute().actionGet();
@ -105,6 +107,8 @@ public class MissingTests extends ElasticsearchIntegrationTest {
@Test
public void partiallyUnmapped() throws Exception {
client().admin().cluster().prepareHealth("unmapped_idx").setWaitForYellowStatus().execute().actionGet();
SearchResponse response = client().prepareSearch("idx", "unmapped_idx")
.addAggregation(missing("missing_tag").field("tag"))
.execute().actionGet();