@@ -71,7 +71,9 @@ public void testGetAdditionalIndexSettings() throws Exception {
7171 String dataStreamName = "logs-app1" ;
7272
7373 Instant now = Instant .now ().truncatedTo (ChronoUnit .SECONDS );
74- Settings settings = Settings .EMPTY ;
74+ Settings settings = Settings .builder ()
75+ .put ("index.dimensions_tsid_strategy_enabled" , indexDimensionsTsidStrategyEnabledSetting )
76+ .build ();
7577 String mapping = """
7678 {
7779 "_doc": {
@@ -117,11 +119,8 @@ public void testGetAdditionalIndexSettings() throws Exception {
117119 Settings result = additionalSettings .build ();
118120 // 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:
119121 // (in production the index.mode setting is usually provided in an index or component template)
120- result = builder ().put (result )
121- .put ("index.mode" , "time_series" )
122- .put ("index.dimensions_tsid_strategy_enabled" , indexDimensionsTsidStrategyEnabledSetting )
123- .build ();
124- assertThat (result .size (), equalTo (5 ));
122+ result = builder ().put (result ).put ("index.mode" , "time_series" ).build ();
123+ assertThat (result .size (), equalTo (4 ));
125124 assertThat (IndexSettings .MODE .get (result ), equalTo (IndexMode .TIME_SERIES ));
126125 assertThat (IndexSettings .TIME_SERIES_START_TIME .get (result ), equalTo (now .minusMillis (DEFAULT_LOOK_BACK_TIME .getMillis ())));
127126 assertThat (IndexSettings .TIME_SERIES_END_TIME .get (result ), equalTo (now .plusMillis (DEFAULT_LOOK_AHEAD_TIME .getMillis ())));
@@ -187,7 +186,9 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
187186 String dataStreamName = "logs-app1" ;
188187
189188 Instant now = Instant .now ().truncatedTo (ChronoUnit .SECONDS );
190- Settings settings = Settings .EMPTY ;
189+ Settings settings = Settings .builder ()
190+ .put ("index.dimensions_tsid_strategy_enabled" , indexDimensionsTsidStrategyEnabledSetting )
191+ .build ();
191192 String mapping1 = """
192193 {
193194 "_doc": {
@@ -249,11 +250,8 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
249250 Settings result = additionalSettings .build ();
250251 // 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:
251252 // (in production the index.mode setting is usually provided in an index or component template)
252- result = builder ().put (result )
253- .put ("index.mode" , "time_series" )
254- .put ("index.dimensions_tsid_strategy_enabled" , indexDimensionsTsidStrategyEnabledSetting )
255- .build ();
256- assertThat (result .size (), equalTo (5 ));
253+ result = builder ().put (result ).put ("index.mode" , "time_series" ).build ();
254+ assertThat (result .size (), equalTo (4 ));
257255 assertThat (IndexSettings .MODE .get (result ), equalTo (IndexMode .TIME_SERIES ));
258256 assertThat (IndexSettings .TIME_SERIES_START_TIME .get (result ), equalTo (now .minusMillis (DEFAULT_LOOK_BACK_TIME .getMillis ())));
259257 assertThat (IndexSettings .TIME_SERIES_END_TIME .get (result ), equalTo (now .plusMillis (DEFAULT_LOOK_AHEAD_TIME .getMillis ())));
0 commit comments