Skip to content

Commit

Permalink
Add test logging for #35644
Browse files Browse the repository at this point in the history
Adding logging to confirm the suspicion that there might be another old index
lingering around in the test cluster in cases where this test occasionally
fails.
  • Loading branch information
Christoph Büscher committed Dec 11, 2018
1 parent a9eccbc commit c595a73
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,14 @@ public void testCountAllIndicesNoQuery() throws IOException {
CountRequest countRequest = new CountRequest();
CountResponse countResponse = execute(countRequest, highLevelClient()::count, highLevelClient()::countAsync);
assertCountHeader(countResponse);
// add logging to get more info about why https://github.com/elastic/elasticsearch/issues/35644 is failing
// TODO remove this once #35644 is fixed
if (countResponse.getCount() != 12) {
SearchRequest searchRequest = new SearchRequest();
searchRequest.source(new SearchSourceBuilder().size(20));
SearchResponse searchResponse = execute(searchRequest, highLevelClient()::search, highLevelClient()::searchAsync);
logger.info("Unexpected hit count, was expecting 12 hits but got: " + searchResponse.toString());
}
assertEquals(12, countResponse.getCount());
}

Expand Down

0 comments on commit c595a73

Please sign in to comment.