Skip to content

Commit

Permalink
[Test] Fix RenameProcessorTests.testRenameExistingFieldNullValue() (#…
Browse files Browse the repository at this point in the history
…29655)

This test fails when the new field name already exists in the ingest
document.
  • Loading branch information
tlrx authored Apr 26, 2018
1 parent 5785245 commit b15631e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void testRenameExistingFieldNullValue() throws Exception {
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));
Expand Down

0 comments on commit b15631e

Please sign in to comment.