wait for green status in test

This commit is contained in:
kimchy 2010-12-04 23:57:44 +02:00
parent f048353046
commit d3cae103d5
1 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,8 @@ public class SimpleIndexTemplateTests extends AbstractNodesTests {
client.prepareIndex("text_index", "type1", "1").setSource("field1", "value1", "field2", "value 2").setRefresh(true).execute().actionGet();
client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();
// now only match on one template (template_1)
searchResponse = client.prepareSearch("text_index")
.setQuery(termQuery("field1", "value1"))