diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/AppendProcessorTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/AppendProcessorTests.java index 8cdb63278d7f1..cef7800e502b8 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/AppendProcessorTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/AppendProcessorTests.java @@ -184,7 +184,7 @@ public void testAppendingUniqueValueToScalar() throws Exception { String field = RandomDocumentPicks.addRandomField(random(), ingestDocument, originalValue); List valuesToAppend = new ArrayList<>(); - String newValue = randomAlphaOfLengthBetween(1, 10); + String newValue = randomValueOtherThan(originalValue, () -> randomAlphaOfLengthBetween(1, 10)); valuesToAppend.add(newValue); Processor appendProcessor = createAppendProcessor(field, valuesToAppend, false); appendProcessor.execute(ingestDocument);