diff --git a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterCustomTagsTests.java b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterCustomTagsTests.java index a775083a..eaee8576 100644 --- a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterCustomTagsTests.java +++ b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterCustomTagsTests.java @@ -37,6 +37,7 @@ import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; +import static org.springframework.cloud.gateway.config.GatewayProperties.Metrics.DEFAULT_PREFIX; /** * @author Ingyu Hwang @@ -46,7 +47,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen @DirtiesContext public class GatewayMetricsFilterCustomTagsTests extends BaseWebClientTests { - private static final String REQUEST_METRICS_NAME = "gateway.requests"; + private static final String REQUEST_METRICS_NAME = DEFAULT_PREFIX + ".requests"; @Autowired private MeterRegistry meterRegistry; diff --git a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterTests.java b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterTests.java index b99097d4..d76a2da6 100644 --- a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterTests.java +++ b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilterTests.java @@ -43,13 +43,14 @@ import org.springframework.web.bind.annotation.RestController; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; +import static org.springframework.cloud.gateway.config.GatewayProperties.Metrics.DEFAULT_PREFIX; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = RANDOM_PORT) @DirtiesContext public class GatewayMetricsFilterTests extends BaseWebClientTests { - private static final String REQUEST_METRICS_NAME = "gateway.requests"; + private static final String REQUEST_METRICS_NAME = DEFAULT_PREFIX + ".requests"; @Autowired private MeterRegistry meterRegistry;