[TEST] fix SearchIT assertion to also accept took set to 0

Closes #24997
This commit is contained in:
javanna 2017-06-01 15:28:56 +02:00 committed by Luca Cavanna
parent 5961e1d6ab
commit 45bdaeced5
1 changed files with 2 additions and 1 deletions

View File

@ -50,6 +50,7 @@ import static org.hamcrest.Matchers.both;
import static org.hamcrest.Matchers.either;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.lessThan;
public class SearchIT extends ESRestHighLevelClientTestCase {
@ -386,7 +387,7 @@ public class SearchIT extends ESRestHighLevelClientTestCase {
}
private static void assertSearchHeader(SearchResponse searchResponse) {
assertThat(searchResponse.getTook().nanos(), greaterThan(0L));
assertThat(searchResponse.getTook().nanos(), greaterThanOrEqualTo(0L));
assertEquals(0, searchResponse.getFailedShards());
assertThat(searchResponse.getTotalShards(), greaterThan(0));
assertEquals(searchResponse.getTotalShards(), searchResponse.getSuccessfulShards());