Skip to content

Commit

Permalink
wait for green status in test
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Dec 4, 2010
1 parent f048353 commit d3cae10
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ protected Client getClient() {

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"))
Expand Down

0 comments on commit d3cae10

Please sign in to comment.