Browse Source

Make OTEL tstcontainers integration test more resilient

Tweak awaitility assertions to fix timing error that often occurs on
local builds.
pull/39389/head
Phillip Webb 2 years ago
parent
commit
88a8550609
  1. 2
      spring-boot-project/spring-boot-testcontainers/src/test/java/org/springframework/boot/testcontainers/service/connection/otlp/OpenTelemetryMetricsContainerConnectionDetailsFactoryIntegrationTests.java

2
spring-boot-project/spring-boot-testcontainers/src/test/java/org/springframework/boot/testcontainers/service/connection/otlp/OpenTelemetryMetricsContainerConnectionDetailsFactoryIntegrationTests.java

@ -88,7 +88,7 @@ class OpenTelemetryMetricsContainerConnectionDetailsFactoryIntegrationTests { @@ -88,7 +88,7 @@ class OpenTelemetryMetricsContainerConnectionDetailsFactoryIntegrationTests {
.untilAsserted(() -> whenPrometheusScraped().then()
.statusCode(200)
.contentType(OPENMETRICS_001)
.body(endsWith("# EOF\n")));
.body(endsWith("# EOF\n"), containsString("service_name")));
whenPrometheusScraped().then()
.body(containsString(
"{job=\"test\",service_name=\"test\",telemetry_sdk_language=\"java\",telemetry_sdk_name=\"io.micrometer\""),

Loading…
Cancel
Save