Updates tests to use default metrics prefix.

This commit is contained in:
spencergibb
2020-10-09 16:13:40 -04:00
parent cd6fe46cd9
commit dfa048faad
2 changed files with 4 additions and 2 deletions

View File

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

View File

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