Skip to content

Commit 82ebf3b

Browse files
Fix flaky CopyProcessorTests (opensearch-project#19074)
Signed-off-by: guojialiang <[email protected]>
1 parent 14491cc commit 82ebf3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/ingest-common/src/test/java/org/opensearch/ingest/common/CopyProcessorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void testCopyExistingField() throws Exception {
4848

4949
public void testCopyWithIgnoreMissing() throws Exception {
5050
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random());
51-
String targetFieldName = RandomDocumentPicks.randomFieldName(random());
51+
String targetFieldName = RandomDocumentPicks.randomNonExistingFieldName(random(), ingestDocument);
5252
Processor processor = createCopyProcessor("non-existing-field", targetFieldName, false, false, false);
5353
assertThrows(
5454
"source field [non-existing-field] doesn't exist",

0 commit comments

Comments
 (0)