[Rollup] Fix duplicate field names in test (#32075)

This commit ensures that random field names do not clash with the explicit field names
set by the tests.

Closes #32067
This commit is contained in:
Jim Ferenczi 2018-07-16 15:25:45 +02:00 committed by GitHub
parent 1fef139c11
commit a3b608d616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ public class ConfigTestHelpers {
if (ESTestCase.randomBoolean()) {
dateHistoBuilder.setDelay(new DateHistogramInterval(randomPositiveTimeValue()));
}
dateHistoBuilder.setField(ESTestCase.randomAlphaOfLengthBetween(1, 10 ));
dateHistoBuilder.setField(ESTestCase.randomAlphaOfLengthBetween(5, 10));
return dateHistoBuilder;
}
@ -112,8 +112,8 @@ public class ConfigTestHelpers {
}
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());
}