Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public void testGetAdditionalIndexSettings() throws Exception {
String dataStreamName = "logs-app1";

Instant now = Instant.now().truncatedTo(ChronoUnit.SECONDS);
Settings settings = Settings.EMPTY;
Settings settings = Settings.builder()
.put("index.dimensions_tsid_strategy_enabled", indexDimensionsTsidStrategyEnabledSetting)
.build();
String mapping = """
{
"_doc": {
Expand Down Expand Up @@ -117,11 +119,8 @@ public void testGetAdditionalIndexSettings() throws Exception {
Settings result = additionalSettings.build();
// 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:
// (in production the index.mode setting is usually provided in an index or component template)
result = builder().put(result)
.put("index.mode", "time_series")
.put("index.dimensions_tsid_strategy_enabled", indexDimensionsTsidStrategyEnabledSetting)
.build();
assertThat(result.size(), equalTo(5));
result = builder().put(result).put("index.mode", "time_series").build();
assertThat(result.size(), equalTo(4));
assertThat(IndexSettings.MODE.get(result), equalTo(IndexMode.TIME_SERIES));
assertThat(IndexSettings.TIME_SERIES_START_TIME.get(result), equalTo(now.minusMillis(DEFAULT_LOOK_BACK_TIME.getMillis())));
assertThat(IndexSettings.TIME_SERIES_END_TIME.get(result), equalTo(now.plusMillis(DEFAULT_LOOK_AHEAD_TIME.getMillis())));
Expand Down Expand Up @@ -187,7 +186,9 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
String dataStreamName = "logs-app1";

Instant now = Instant.now().truncatedTo(ChronoUnit.SECONDS);
Settings settings = Settings.EMPTY;
Settings settings = Settings.builder()
.put("index.dimensions_tsid_strategy_enabled", indexDimensionsTsidStrategyEnabledSetting)
.build();
String mapping1 = """
{
"_doc": {
Expand Down Expand Up @@ -249,11 +250,8 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
Settings result = additionalSettings.build();
// 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:
// (in production the index.mode setting is usually provided in an index or component template)
result = builder().put(result)
.put("index.mode", "time_series")
.put("index.dimensions_tsid_strategy_enabled", indexDimensionsTsidStrategyEnabledSetting)
.build();
assertThat(result.size(), equalTo(5));
result = builder().put(result).put("index.mode", "time_series").build();
assertThat(result.size(), equalTo(4));
assertThat(IndexSettings.MODE.get(result), equalTo(IndexMode.TIME_SERIES));
assertThat(IndexSettings.TIME_SERIES_START_TIME.get(result), equalTo(now.minusMillis(DEFAULT_LOOK_BACK_TIME.getMillis())));
assertThat(IndexSettings.TIME_SERIES_END_TIME.get(result), equalTo(now.plusMillis(DEFAULT_LOOK_AHEAD_TIME.getMillis())));
Expand Down
6 changes: 0 additions & 6 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,9 @@ tests:
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT
method: testOneRemoteClusterPartial
issue: https://github.com/elastic/elasticsearch/issues/124055
- class: org.elasticsearch.datastreams.DataStreamIndexSettingsProviderTests
method: testGetAdditionalIndexSettingsMappingsMerging
issue: https://github.com/elastic/elasticsearch/issues/135884
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
method: testTopNPushedToLuceneOnSortedIndex
issue: https://github.com/elastic/elasticsearch/issues/135939
- class: org.elasticsearch.datastreams.DataStreamIndexSettingsProviderTests
method: testGetAdditionalIndexSettings
issue: https://github.com/elastic/elasticsearch/issues/135972
- class: org.elasticsearch.test.rest.ClientYamlTestSuiteIT
method: test {yaml=indices.get_sample/10_basic/Test get sample for index with no sample config}
issue: https://github.com/elastic/elasticsearch/issues/135975
Expand Down