Skip to content

Commit 493ffad

Browse files
authored
Fix compile error in TSDBIndexingIT (#135641)
1 parent 0cee213 commit 493ffad

File tree

1 file changed

+7
-13
lines changed
  • modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams

1 file changed

+7
-13
lines changed

modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/TSDBIndexingIT.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -698,19 +698,13 @@ public void testAddDimensionToMapping() throws Exception {
698698
}
699699
""", XContentType.JSON);
700700
ActionFuture<AcknowledgedResponse> putMappingFuture = client().execute(TransportPutMappingAction.TYPE, putMappingRequest);
701-
if (INDEX_DIMENSIONS_TSID_OPTIMIZATION_FEATURE_FLAG) {
702-
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, putMappingFuture::actionGet);
703-
assertThat(
704-
exception.getMessage(),
705-
containsString("Cannot add dynamic templates that define dimension fields on an existing index with index.dimensions")
706-
);
707-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_DIMENSIONS), containsInAnyOrder("metricset", "k8s.pod.name"));
708-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_ROUTING_PATH), empty());
709-
} else {
710-
assertAcked(putMappingFuture);
711-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_ROUTING_PATH), containsInAnyOrder("metricset"));
712-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_DIMENSIONS), empty());
713-
}
701+
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, putMappingFuture::actionGet);
702+
assertThat(
703+
exception.getMessage(),
704+
containsString("Cannot add dynamic templates that define dimension fields on an existing index with index.dimensions")
705+
);
706+
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_DIMENSIONS), containsInAnyOrder("metricset", "k8s.pod.name"));
707+
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_ROUTING_PATH), empty());
714708
indexWithPodNames(dataStreamName, Instant.now(), Map.of(), "dog", "cat");
715709
}
716710

0 commit comments

Comments
 (0)