fix targetField randomization in JoinProcessorTests (#26206)

Closes #26203.
This commit is contained in:
Tal Levy 2017-08-14 09:26:47 -07:00 committed by GitHub
parent 685e35e0ae
commit 0c76d17fe1

View File

@ -124,7 +124,7 @@ public class JoinProcessorTests extends ESTestCase {
} }
} }
String fieldName = RandomDocumentPicks.addRandomField(random(), ingestDocument, fieldValue); String fieldName = RandomDocumentPicks.addRandomField(random(), ingestDocument, fieldValue);
String targetFieldName = RandomDocumentPicks.randomFieldName(random()); String targetFieldName = fieldName + randomAlphaOfLength(5);
Processor processor = new JoinProcessor(randomAlphaOfLength(10), fieldName, separator, targetFieldName); Processor processor = new JoinProcessor(randomAlphaOfLength(10), fieldName, separator, targetFieldName);
processor.execute(ingestDocument); processor.execute(ingestDocument);
assertThat(ingestDocument.getFieldValue(targetFieldName, String.class), equalTo(expectedResult)); assertThat(ingestDocument.getFieldValue(targetFieldName, String.class), equalTo(expectedResult));