Skip to content

Commit 89874c9

Browse files
Make org.elasticsearch.ingest.common.ScriptProcessorTests#testScripting more precise
1 parent ada26d7 commit 89874c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/ScriptProcessorTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public void testScripting() throws Exception {
5757
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);
5858

5959
doAnswer(invocationOnMock -> {
60-
ingestDocument.setFieldValue("bytes_total", randomBytesTotal);
60+
@SuppressWarnings("unchecked")
61+
Map<String, Object> ctx = (Map<String, Object>) invocationOnMock.getArguments()[0];
62+
ctx.put("bytes_total", randomBytesTotal);
6163
return null;
6264
}).when(executableScript).execute(anyMapOf(String.class, Object.class));
6365

0 commit comments

Comments
 (0)