Skip to content

Commit

Permalink
add tag and remove property not needed from RestService
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarranzan committed Jun 13, 2024
1 parent 21ba9a1 commit 31d4066
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
import java.util.concurrent.TimeUnit;

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.scenarios.QuarkusScenario;
import io.quarkus.test.services.QuarkusApplication;

@Tag("QUARKUS-4430")
@QuarkusScenario
public class HttpPathMetricsPatternIT {

Expand All @@ -28,8 +30,7 @@ public class HttpPathMetricsPatternIT {
private static final String EMPTY_ENDPOINT = "/test";

@QuarkusApplication
static RestService app = new RestService()
.withProperty("quarkus.management.enabled", "true");
static RestService app = new RestService();

@Test
public void verifyNotFoundInMetrics() {
Expand Down Expand Up @@ -99,7 +100,7 @@ private void whenCallDynamicSegmentEndpoint(String id) {

private void thenMetricIsExposedInServiceEndpoint(int statusCode, String outcome, String uri) {
await().ignoreExceptions().atMost(ASSERT_METRICS_TIMEOUT_SECONDS, TimeUnit.SECONDS).untilAsserted(() -> {
String metrics = app.management().get("/q/metrics").then()
String metrics = app.given().get("/q/metrics").then()
.statusCode(HttpStatus.SC_OK).extract().asString();
for (String metricSuffix : HTTP_SERVER_REQUESTS_METRICS_SUFFIX) {
String metric = String.format(HTTP_SERVER_REQUESTS_METRICS_FORMAT, metricSuffix, outcome, statusCode, uri);
Expand Down

0 comments on commit 31d4066

Please sign in to comment.