test: don't return 0, at least one request must be added to msearch request

also the maxConcurrentSearchRequests() setter only support positive values.
This commit is contained in:
Martijn van Groningen 2016-06-14 23:26:10 +02:00
parent f7f377791f
commit 14d6b04944
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public class MultiSearchIT extends ESIntegTestCase {
} }
refresh(); refresh();
int numSearchRequests = randomIntBetween(0, 64); int numSearchRequests = randomIntBetween(1, 64);
MultiSearchRequest request = new MultiSearchRequest(); MultiSearchRequest request = new MultiSearchRequest();
if (randomBoolean()) { if (randomBoolean()) {
request.maxConcurrentSearchRequests(randomIntBetween(1, numSearchRequests)); request.maxConcurrentSearchRequests(randomIntBetween(1, numSearchRequests));