[TEST] fix SearchScrollTests, scroll doesn't support searchType count
This commit is contained in:
parent
83fb0a10e5
commit
ff6b605778
|
@ -62,7 +62,7 @@ public abstract class TransportSearchHelper {
|
|||
} else if (searchType == SearchType.SCAN) {
|
||||
return buildScrollId(ParsedScrollId.SCAN, searchPhaseResults, attributes);
|
||||
} else {
|
||||
throw new ElasticsearchIllegalStateException();
|
||||
throw new ElasticsearchIllegalStateException("search_type [" + searchType + "] not supported");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ public class SearchScrollTests extends ElasticsearchIntegrationTest {
|
|||
.setQuery(QueryBuilders.matchAllQuery())
|
||||
.setSize(Integer.MAX_VALUE);
|
||||
|
||||
if (searchType == SearchType.SCAN || randomBoolean()) {
|
||||
if (searchType == SearchType.SCAN || searchType != SearchType.COUNT && randomBoolean()) {
|
||||
builder.setScroll("1m");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue