@@ -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