Skip to content

Commit

Permalink
[Rollup] Fix duplicate field names in test (#32075)
Browse files Browse the repository at this point in the history
This commit ensures that random field names do not clash with the explicit field names
set by the tests.

Closes #32067
  • Loading branch information
jimczi committed Jul 16, 2018
1 parent 69e61c7 commit ac60fca
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static DateHistoGroupConfig.Builder getDateHisto() {
if (ESTestCase.randomBoolean()) {
dateHistoBuilder.setDelay(new DateHistogramInterval(randomPositiveTimeValue()));
}
dateHistoBuilder.setField(ESTestCase.randomAlphaOfLengthBetween(1, 10 ));
dateHistoBuilder.setField(ESTestCase.randomAlphaOfLengthBetween(5, 10));
return dateHistoBuilder;
}

Expand All @@ -112,8 +112,8 @@ public static TermsGroupConfig.Builder getTerms() {
}

public static List<String> getFields() {
return IntStream.range(0, ESTestCase.randomIntBetween(1,10))
.mapToObj(n -> ESTestCase.randomAlphaOfLengthBetween(1,10))
return IntStream.range(0, ESTestCase.randomIntBetween(1, 10))
.mapToObj(n -> ESTestCase.randomAlphaOfLengthBetween(5, 10))
.collect(Collectors.toList());
}

Expand Down

0 comments on commit ac60fca

Please sign in to comment.