1212import org .elasticsearch .cluster .metadata .DataStreamTestHelper ;
1313import org .elasticsearch .cluster .metadata .IndexMetadata ;
1414import org .elasticsearch .cluster .metadata .ProjectMetadata ;
15+ import org .elasticsearch .common .collect .ImmutableOpenMap ;
1516import org .elasticsearch .common .compress .CompressedXContent ;
1617import org .elasticsearch .common .settings .Settings ;
1718import org .elasticsearch .core .Strings ;
@@ -82,7 +83,8 @@ public void testGetAdditionalIndexSettings() throws Exception {
8283 projectMetadata ,
8384 now ,
8485 settings ,
85- List .of (new CompressedXContent (mapping ))
86+ List .of (new CompressedXContent (mapping )),
87+ ImmutableOpenMap .builder ()
8688 );
8789 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
8890 // (in production the index.mode setting is usually provided in an index or component template)
@@ -105,7 +107,7 @@ public void testGetAdditionalIndexSettingsIndexRoutingPathAlreadyDefined() throw
105107 "_doc": {
106108 "properties": {
107109 "field1": {
108- "type": "keyword"
110+ "type": "keyword",
109111 "time_series_dimension": true
110112 },
111113 "field2": {
@@ -127,7 +129,8 @@ public void testGetAdditionalIndexSettingsIndexRoutingPathAlreadyDefined() throw
127129 projectMetadata ,
128130 now ,
129131 settings ,
130- List .of (new CompressedXContent (mapping ))
132+ List .of (new CompressedXContent (mapping )),
133+ ImmutableOpenMap .builder ()
131134 );
132135 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
133136 // (in production the index.mode setting is usually provided in an index or component template)
@@ -197,7 +200,8 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
197200 projectMetadata ,
198201 now ,
199202 settings ,
200- List .of (new CompressedXContent (mapping1 ), new CompressedXContent (mapping2 ), new CompressedXContent (mapping3 ))
203+ List .of (new CompressedXContent (mapping1 ), new CompressedXContent (mapping2 ), new CompressedXContent (mapping3 )),
204+ ImmutableOpenMap .builder ()
201205 );
202206 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
203207 // (in production the index.mode setting is usually provided in an index or component template)
@@ -222,7 +226,8 @@ public void testGetAdditionalIndexSettingsNoMappings() {
222226 projectMetadata ,
223227 now ,
224228 settings ,
225- List .of ()
229+ List .of (),
230+ ImmutableOpenMap .builder ()
226231 );
227232 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
228233 // (in production the index.mode setting is usually provided in an index or component template)
@@ -247,7 +252,8 @@ public void testGetAdditionalIndexSettingsLookAheadTime() throws Exception {
247252 projectMetadata ,
248253 now ,
249254 settings ,
250- List .of (new CompressedXContent ("{}" ))
255+ List .of (new CompressedXContent ("{}" )),
256+ ImmutableOpenMap .builder ()
251257 );
252258 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
253259 // (in production the index.mode setting is usually provided in an index or component template)
@@ -272,7 +278,8 @@ public void testGetAdditionalIndexSettingsLookBackTime() throws Exception {
272278 projectMetadata ,
273279 now ,
274280 settings ,
275- List .of (new CompressedXContent ("{}" ))
281+ List .of (new CompressedXContent ("{}" )),
282+ ImmutableOpenMap .builder ()
276283 );
277284 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
278285 // (in production the index.mode setting is usually provided in an index or component template)
@@ -304,7 +311,8 @@ public void testGetAdditionalIndexSettingsDataStreamAlreadyCreated() throws Exce
304311 projectMetadata ,
305312 now ,
306313 settings ,
307- List .of (new CompressedXContent ("{}" ))
314+ List .of (new CompressedXContent ("{}" )),
315+ ImmutableOpenMap .builder ()
308316 );
309317 assertThat (result .size (), equalTo (2 ));
310318 assertThat (result .get (IndexSettings .TIME_SERIES_START_TIME .getKey ()), equalTo (FORMATTER .format (currentEnd )));
@@ -341,7 +349,8 @@ public void testGetAdditionalIndexSettingsDataStreamAlreadyCreatedTimeSettingsMi
341349 projectMetadata ,
342350 now ,
343351 settings ,
344- null
352+ null ,
353+ ImmutableOpenMap .builder ()
345354 )
346355 );
347356 assertThat (
@@ -367,7 +376,8 @@ public void testGetAdditionalIndexSettingsNonTsdbTemplate() {
367376 projectMetadata ,
368377 Instant .ofEpochMilli (1L ),
369378 settings ,
370- null
379+ null ,
380+ ImmutableOpenMap .builder ()
371381 );
372382 assertThat (result .size (), equalTo (0 ));
373383 }
@@ -389,7 +399,8 @@ public void testGetAdditionalIndexSettingsMigrateToTsdb() {
389399 projectMetadata ,
390400 now ,
391401 settings ,
392- List .of ()
402+ List .of (),
403+ ImmutableOpenMap .builder ()
393404 );
394405 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
395406 // (in production the index.mode setting is usually provided in an index or component template)
@@ -419,7 +430,8 @@ public void testGetAdditionalIndexSettingsDowngradeFromTsdb() {
419430 projectMetadata ,
420431 Instant .ofEpochMilli (1L ),
421432 settings ,
422- List .of ()
433+ List .of (),
434+ ImmutableOpenMap .builder ()
423435 );
424436 assertThat (result .size (), equalTo (0 ));
425437 }
@@ -698,7 +710,8 @@ private Settings generateTsdbSettings(String mapping, Instant now) throws IOExce
698710 projectMetadata ,
699711 now ,
700712 settings ,
701- List .of (new CompressedXContent (mapping ))
713+ List .of (new CompressedXContent (mapping )),
714+ ImmutableOpenMap .builder ()
702715 );
703716 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
704717 // (in production the index.mode setting is usually provided in an index or component template)
0 commit comments