[TESTS] ensureGreen, else reported successful shards will be lower than expected

This commit is contained in:
Britta Weber 2015-01-23 17:12:33 +01:00
parent b6c74fb21c
commit c617af37e8
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ public class DeleteByQueryTests extends ElasticsearchIntegrationTest {
client().prepareIndex("twitter", "tweet").setSource(json).setRefresh(true).execute().actionGet();
ensureGreen("twitter");
SearchResponse search = client().prepareSearch().setQuery(QueryBuilders.matchAllQuery()).execute().actionGet();
assertThat(search.getHits().totalHits(), equalTo(1l));
DeleteByQueryRequestBuilder deleteByQueryRequestBuilder = client().prepareDeleteByQuery();