Skip to content

Commit e648edd

Browse files
nik9000javanna
authored andcommitted
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 ea2f68e commit e648edd

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
@@ -1470,7 +1470,7 @@ public void testExplain() throws IOException {
14701470
expectedParams.put("preference", preference);
14711471
}
14721472
if (randomBoolean()) {
1473-
String[] storedFields = generateRandomStringArray(10, 5, false);
1473+
String[] storedFields = generateRandomStringArray(10, 5, false, false);
14741474
String storedFieldsParams = randomFields(storedFields);
14751475
explainRequest.storedFields(storedFields);
14761476
expectedParams.put("stored_fields", storedFieldsParams);

0 commit comments

Comments
 (0)