fix SplitProcessor targetField test (#26178)

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.
This commit is contained in:
Tal Levy 2017-08-11 16:18:04 -07:00 committed by GitHub
parent e278eacea3
commit 10c3c1aef0
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ public class SplitProcessorTests extends ESTestCase {
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")));