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 0051762 commit 620417d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,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 @@ -111,8 +111,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 620417d

Please sign in to comment.