@@ -80,24 +80,20 @@ void connectionCanBeMadeToOpenTelemetryCollectorContainer() {
80
80
Timer .builder ("test.timer" ).register (this .meterRegistry ).record (Duration .ofMillis (123 ));
81
81
DistributionSummary .builder ("test.distributionsummary" ).register (this .meterRegistry ).record (24 );
82
82
Awaitility .await ()
83
- .atMost (Duration .ofSeconds (5 ))
84
- .pollDelay (Duration .ofMillis (100 ))
85
- .pollInterval (Duration .ofMillis (100 ))
83
+ .atMost (Duration .ofSeconds (30 ))
86
84
.untilAsserted (() -> whenPrometheusScraped ().then ()
87
85
.statusCode (200 )
88
86
.contentType (OPENMETRICS_001 )
89
- .body (endsWith ("# EOF\n " ), containsString ("service_name" )));
90
- whenPrometheusScraped ().then ()
91
- .body (containsString (
92
- "{job=\" test\" ,service_name=\" test\" ,telemetry_sdk_language=\" java\" ,telemetry_sdk_name=\" io.micrometer\" " ),
93
- matchesPattern ("(?s)^.*test_counter\\ {.+} 42\\ .0\\ n.*$" ),
94
- matchesPattern ("(?s)^.*test_gauge\\ {.+} 12\\ .0\\ n.*$" ),
95
- matchesPattern ("(?s)^.*test_timer_count\\ {.+} 1\\ n.*$" ),
96
- matchesPattern ("(?s)^.*test_timer_sum\\ {.+} 123\\ .0\\ n.*$" ),
97
- matchesPattern ("(?s)^.*test_timer_bucket\\ {.+,le=\" \\ +Inf\" } 1\\ n.*$" ),
98
- matchesPattern ("(?s)^.*test_distributionsummary_count\\ {.+} 1\\ n.*$" ),
99
- matchesPattern ("(?s)^.*test_distributionsummary_sum\\ {.+} 24\\ .0\\ n.*$" ),
100
- matchesPattern ("(?s)^.*test_distributionsummary_bucket\\ {.+,le=\" \\ +Inf\" } 1\\ n.*$" ));
87
+ .body (endsWith ("# EOF\n " ), containsString (
88
+ "{job=\" test\" ,service_name=\" test\" ,telemetry_sdk_language=\" java\" ,telemetry_sdk_name=\" io.micrometer\" " ),
89
+ matchesPattern ("(?s)^.*test_counter\\ {.+} 42\\ .0\\ n.*$" ),
90
+ matchesPattern ("(?s)^.*test_gauge\\ {.+} 12\\ .0\\ n.*$" ),
91
+ matchesPattern ("(?s)^.*test_timer_count\\ {.+} 1\\ n.*$" ),
92
+ matchesPattern ("(?s)^.*test_timer_sum\\ {.+} 123\\ .0\\ n.*$" ),
93
+ matchesPattern ("(?s)^.*test_timer_bucket\\ {.+,le=\" \\ +Inf\" } 1\\ n.*$" ),
94
+ matchesPattern ("(?s)^.*test_distributionsummary_count\\ {.+} 1\\ n.*$" ),
95
+ matchesPattern ("(?s)^.*test_distributionsummary_sum\\ {.+} 24\\ .0\\ n.*$" ),
96
+ matchesPattern ("(?s)^.*test_distributionsummary_bucket\\ {.+,le=\" \\ +Inf\" } 1\\ n.*$" )));
101
97
}
102
98
103
99
private Response whenPrometheusScraped () {
0 commit comments