[TESTS] ensureGreen, else reported successful shards will be lower than expected
This commit is contained in:
parent
b6c74fb21c
commit
c617af37e8
|
@ -79,6 +79,7 @@ public class DeleteByQueryTests extends ElasticsearchIntegrationTest {
|
||||||
|
|
||||||
client().prepareIndex("twitter", "tweet").setSource(json).setRefresh(true).execute().actionGet();
|
client().prepareIndex("twitter", "tweet").setSource(json).setRefresh(true).execute().actionGet();
|
||||||
|
|
||||||
|
ensureGreen("twitter");
|
||||||
SearchResponse search = client().prepareSearch().setQuery(QueryBuilders.matchAllQuery()).execute().actionGet();
|
SearchResponse search = client().prepareSearch().setQuery(QueryBuilders.matchAllQuery()).execute().actionGet();
|
||||||
assertThat(search.getHits().totalHits(), equalTo(1l));
|
assertThat(search.getHits().totalHits(), equalTo(1l));
|
||||||
DeleteByQueryRequestBuilder deleteByQueryRequestBuilder = client().prepareDeleteByQuery();
|
DeleteByQueryRequestBuilder deleteByQueryRequestBuilder = client().prepareDeleteByQuery();
|
||||||
|
|
Loading…
Reference in New Issue