@@ -71,7 +71,9 @@ public void testGetAdditionalIndexSettings() throws Exception {
71
71
String dataStreamName = "logs-app1" ;
72
72
73
73
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 ();
75
77
String mapping = """
76
78
{
77
79
"_doc": {
@@ -117,11 +119,8 @@ public void testGetAdditionalIndexSettings() throws Exception {
117
119
Settings result = additionalSettings .build ();
118
120
// 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:
119
121
// (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 ));
125
124
assertThat (IndexSettings .MODE .get (result ), equalTo (IndexMode .TIME_SERIES ));
126
125
assertThat (IndexSettings .TIME_SERIES_START_TIME .get (result ), equalTo (now .minusMillis (DEFAULT_LOOK_BACK_TIME .getMillis ())));
127
126
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 {
187
186
String dataStreamName = "logs-app1" ;
188
187
189
188
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 ();
191
192
String mapping1 = """
192
193
{
193
194
"_doc": {
@@ -249,11 +250,8 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
249
250
Settings result = additionalSettings .build ();
250
251
// 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:
251
252
// (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 ));
257
255
assertThat (IndexSettings .MODE .get (result ), equalTo (IndexMode .TIME_SERIES ));
258
256
assertThat (IndexSettings .TIME_SERIES_START_TIME .get (result ), equalTo (now .minusMillis (DEFAULT_LOOK_BACK_TIME .getMillis ())));
259
257
assertThat (IndexSettings .TIME_SERIES_END_TIME .get (result ), equalTo (now .plusMillis (DEFAULT_LOOK_AHEAD_TIME .getMillis ())));
0 commit comments