Skip to content

Commit ce1d0f5

Browse files
committed
HLRest: Fix test for explain API
The test could sometimes generate an empty array of random stored fields to fetch which would cause the test to fail. It is fine not to allow empty here because we already randomize whether or not to generate the stored fields param anyway.
1 parent 7520025 commit ce1d0f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ public void testExplain() throws IOException {
14421442
expectedParams.put("preference", preference);
14431443
}
14441444
if (randomBoolean()) {
1445-
String[] storedFields = generateRandomStringArray(10, 5, false);
1445+
String[] storedFields = generateRandomStringArray(10, 5, false, false);
14461446
String storedFieldsParams = randomFields(storedFields);
14471447
explainRequest.storedFields(storedFields);
14481448
expectedParams.put("stored_fields", storedFieldsParams);

0 commit comments

Comments
 (0)