@@ -163,7 +163,7 @@ private void assertMappingsUpdatedFromSubstitutions(String indexName, String ind
163163 """ , XContentType .JSON ).id (randomUUID ());
164164 {
165165 // First we use the original component template, and expect a failure in the second document:
166- BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of ());
166+ BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of (), null );
167167 bulkRequest .add (indexRequest1 );
168168 bulkRequest .add (indexRequest2 );
169169 BulkResponse response = client ().execute (new ActionType <BulkResponse >(SimulateBulkAction .NAME ), bulkRequest ).actionGet ();
@@ -197,7 +197,8 @@ private void assertMappingsUpdatedFromSubstitutions(String indexName, String ind
197197 )
198198 ),
199199 Map .of (),
200- Map .of ()
200+ Map .of (),
201+ null
201202 );
202203 bulkRequest .add (indexRequest1 );
203204 bulkRequest .add (indexRequest2 );
@@ -235,7 +236,8 @@ private void assertMappingsUpdatedFromSubstitutions(String indexName, String ind
235236 indexTemplateName ,
236237 Map .of ("index_patterns" , List .of (indexName ), "composed_of" , List .of ("test-component-template-2" ))
237238 ),
238- Map .of ()
239+ Map .of (),
240+ null
239241 );
240242 bulkRequest .add (indexRequest1 );
241243 bulkRequest .add (indexRequest2 );
@@ -258,7 +260,8 @@ private void assertMappingsUpdatedFromSubstitutions(String indexName, String ind
258260 Map .of (
259261 "_doc" ,
260262 Map .of ("dynamic" , "strict" , "properties" , Map .of ("foo1" , Map .of ("type" , "text" ), "foo3" , Map .of ("type" , "text" )))
261- )
263+ ),
264+ null
262265 );
263266 bulkRequest .add (indexRequest1 );
264267 bulkRequest .add (indexRequest2 );
@@ -277,7 +280,7 @@ public void testMappingValidationIndexDoesNotExistsNoTemplate() {
277280 * mapping-less "random-index-template" created by the parent class), so we expect no mapping validation failure.
278281 */
279282 String indexName = randomAlphaOfLength (20 ).toLowerCase (Locale .ROOT );
280- BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of ());
283+ BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of (), null );
281284 bulkRequest .add (new IndexRequest (indexName ).source ("""
282285 {
283286 "foo1": "baz"
@@ -324,7 +327,7 @@ public void testMappingValidationIndexDoesNotExistsV2Template() throws IOExcepti
324327 request .indexTemplate (composableIndexTemplate );
325328
326329 client ().execute (TransportPutComposableIndexTemplateAction .TYPE , request ).actionGet ();
327- BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of ());
330+ BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of (), null );
328331 bulkRequest .add (new IndexRequest (indexName ).source ("""
329332 {
330333 "foo1": "baz"
@@ -356,7 +359,7 @@ public void testMappingValidationIndexDoesNotExistsV1Template() {
356359 indicesAdmin ().putTemplate (
357360 new PutIndexTemplateRequest ("test-template" ).patterns (List .of ("my-index-*" )).mapping ("foo1" , "type=integer" )
358361 ).actionGet ();
359- BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of ());
362+ BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of (), null );
360363 bulkRequest .add (new IndexRequest (indexName ).source ("""
361364 {
362365 "foo1": "baz"
@@ -410,7 +413,7 @@ public void testMappingValidationIndexDoesNotExistsDataStream() throws IOExcepti
410413 client ().execute (TransportPutComposableIndexTemplateAction .TYPE , request ).actionGet ();
411414 {
412415 // First, try with no @timestamp to make sure we're picking up data-stream-specific templates
413- BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of ());
416+ BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of (), null );
414417 bulkRequest .add (new IndexRequest (indexName ).source ("""
415418 {
416419 "foo1": "baz"
@@ -437,7 +440,7 @@ public void testMappingValidationIndexDoesNotExistsDataStream() throws IOExcepti
437440 }
438441 {
439442 // Now with @timestamp
440- BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of ());
443+ BulkRequest bulkRequest = new SimulateBulkRequest (Map .of (), Map .of (), Map .of (), Map .of (), null );
441444 bulkRequest .add (new IndexRequest (indexName ).source ("""
442445 {
443446 "@timestamp": "2024-08-27",
0 commit comments