From 6a5c6ea9b740040f8b48690ded6e05e7b49680c6 Mon Sep 17 00:00:00 2001 From: Tal Levy Date: Fri, 11 Aug 2017 13:46:40 -0700 Subject: [PATCH] fix SplitProcessor targetField test This test was too lenient with its randomization of targetFieldName and resulting in a conflict with the original existing fields. This commit fixes that. Closes #26177. --- .../org/elasticsearch/ingest/common/SplitProcessorTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/SplitProcessorTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/SplitProcessorTests.java index b4800cd387766..a11df5a372664 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/SplitProcessorTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/SplitProcessorTests.java @@ -120,7 +120,7 @@ public void testSplitAppendable() throws Exception { public void testSplitWithTargetField() throws Exception { IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random()); String fieldName = RandomDocumentPicks.addRandomField(random(), ingestDocument, "127.0.0.1"); - String targetFieldName = RandomDocumentPicks.randomFieldName(random()); + String targetFieldName = fieldName + randomAlphaOfLength(5); Processor processor = new SplitProcessor(randomAlphaOfLength(10), fieldName, "\\.", false, targetFieldName); processor.execute(ingestDocument); assertThat(ingestDocument.getFieldValue(targetFieldName, List.class), equalTo(Arrays.asList("127", "0", "0", "1")));