Skip to content

Commit

Permalink
HLRest: Fix test for explain API
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nik9000 committed Jun 27, 2018
1 parent 7520025 commit ce1d0f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ public void testExplain() throws IOException {
expectedParams.put("preference", preference);
}
if (randomBoolean()) {
String[] storedFields = generateRandomStringArray(10, 5, false);
String[] storedFields = generateRandomStringArray(10, 5, false, false);
String storedFieldsParams = randomFields(storedFields);
explainRequest.storedFields(storedFields);
expectedParams.put("stored_fields", storedFieldsParams);
Expand Down

0 comments on commit ce1d0f5

Please sign in to comment.