From c84d43331965f1753a85ef8f4d11c321103d73bf Mon Sep 17 00:00:00 2001 From: Fedor Dudinskiy Date: Fri, 13 Jan 2023 08:47:02 +0100 Subject: [PATCH] Fix error in daily runs See https://github.com/quarkusio/quarkus/issues/30343 for details --- .../ts/micrometer/prometheus/HttpServerMetricsIT.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/monitoring/micrometer-prometheus/src/test/java/io/quarkus/ts/micrometer/prometheus/HttpServerMetricsIT.java b/monitoring/micrometer-prometheus/src/test/java/io/quarkus/ts/micrometer/prometheus/HttpServerMetricsIT.java index 4efcf8ba0a..46ce7f5140 100644 --- a/monitoring/micrometer-prometheus/src/test/java/io/quarkus/ts/micrometer/prometheus/HttpServerMetricsIT.java +++ b/monitoring/micrometer-prometheus/src/test/java/io/quarkus/ts/micrometer/prometheus/HttpServerMetricsIT.java @@ -22,7 +22,13 @@ public class HttpServerMetricsIT { private static final int ASSERT_METRICS_TIMEOUT_MINUTES = 1; private static final List HTTP_SERVER_REQUESTS_METRICS_SUFFIX = Arrays.asList("count", "sum", "max"); - private static final String HTTP_SERVER_REQUESTS_METRICS_FORMAT = "http_server_requests_seconds_%s{method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"%s\",}"; + /* + * In versions before 2.16 metrics have format '{a,b,}' (with trailing comma) + * Starting from 2.16 the format changed to '{a,b}' + * See https://github.com/quarkusio/quarkus/issues/30343 for details + * TODO: add '}' to the end, when this stabilizes + */ + private static final String HTTP_SERVER_REQUESTS_METRICS_FORMAT = "http_server_requests_seconds_%s{method=\"GET\",outcome=\"SUCCESS\",status=\"200\",uri=\"%s\""; private static final String PING_PONG_ENDPOINT = "/without-metrics-pingpong"; @Test