[Test] Fix RenameProcessorTests.testRenameExistingFieldNullValue() (#29655)
This test fails when the new field name already exists in the ingest document.
This commit is contained in:
parent
5785245ae1
commit
b15631ee54
|
@ -128,7 +128,7 @@ public class RenameProcessorTests extends ESTestCase {
|
|||
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>());
|
||||
String fieldName = RandomDocumentPicks.randomFieldName(random());
|
||||
ingestDocument.setFieldValue(fieldName, null);
|
||||
String newFieldName = RandomDocumentPicks.randomFieldName(random());
|
||||
String newFieldName = randomValueOtherThanMany(ingestDocument::hasField, () -> RandomDocumentPicks.randomFieldName(random()));
|
||||
Processor processor = new RenameProcessor(randomAlphaOfLength(10), fieldName, newFieldName, false);
|
||||
processor.execute(ingestDocument);
|
||||
assertThat(ingestDocument.hasField(fieldName), equalTo(false));
|
||||
|
|
Loading…
Reference in New Issue