From 52c84692259cc6e73ead09ac89721cdb616bb0e2 Mon Sep 17 00:00:00 2001 From: David Kyle Date: Fri, 21 Apr 2017 11:04:22 +0100 Subject: [PATCH] =?UTF-8?q?[ML]=20Fix=20test=20failure=20by=20preventing?= =?UTF-8?q?=20random=20string=20from=20being=20=E2=80=98by=E2=80=99,=20?= =?UTF-8?q?=E2=80=98over=E2=80=99=20or=20=E2=80=98count=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit: elastic/x-pack-elasticsearch@8c79af0b771991cfbb4c931623caf2d77d7efa8e --- .../elasticsearch/xpack/ml/job/config/DetectorTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java index d7d28e8a28c..99c06567646 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java @@ -147,11 +147,11 @@ public class DetectorTests extends AbstractSerializingTestCase { } String fieldName = null; if (randomBoolean()) { - detector.setPartitionFieldName(fieldName = randomAlphaOfLengthBetween(1, 20)); + detector.setPartitionFieldName(fieldName = randomAlphaOfLengthBetween(6, 20)); } else if (randomBoolean() && Detector.NO_OVER_FIELD_NAME_FUNCTIONS.contains(function) == false) { - detector.setOverFieldName(fieldName = randomAlphaOfLengthBetween(1, 20)); + detector.setOverFieldName(fieldName = randomAlphaOfLengthBetween(6, 20)); } else if (randomBoolean() && Detector.NO_BY_FIELD_NAME_FUNCTIONS.contains(function) == false) { - detector.setByFieldName(fieldName = randomAlphaOfLengthBetween(1, 20)); + detector.setByFieldName(fieldName = randomAlphaOfLengthBetween(6, 20)); } if (randomBoolean()) { detector.setExcludeFrequent(randomFrom(Detector.ExcludeFrequent.values()));