From aa401f1f1d218eda701d955c0b02376ba43d8d7f Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Thu, 30 Nov 2023 14:22:08 +0100 Subject: [PATCH] Scheduler: increase the timeout in OpenTelemetry integration tests --- .../it/opentelemetry/quartz/OpenTelemetryQuartzTest.java | 5 +++-- .../opentelemetry/scheduler/OpenTelemetrySchedulerTest.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/integration-tests/opentelemetry-quartz/src/test/java/io/quarkus/it/opentelemetry/quartz/OpenTelemetryQuartzTest.java b/integration-tests/opentelemetry-quartz/src/test/java/io/quarkus/it/opentelemetry/quartz/OpenTelemetryQuartzTest.java index 7f3897f6c3671..0238f61946b2f 100644 --- a/integration-tests/opentelemetry-quartz/src/test/java/io/quarkus/it/opentelemetry/quartz/OpenTelemetryQuartzTest.java +++ b/integration-tests/opentelemetry-quartz/src/test/java/io/quarkus/it/opentelemetry/quartz/OpenTelemetryQuartzTest.java @@ -28,9 +28,9 @@ public class OpenTelemetryQuartzTest { @Test public void quartzSpanTest() { // ensure that scheduled job is called - assertCounter("/scheduler/count", 1, Duration.ofSeconds(1)); + assertCounter("/scheduler/count", 1, Duration.ofSeconds(3)); // assert programmatically scheduled job is called - assertCounter("/scheduler/count/manual", 1, Duration.ofSeconds(1)); + assertCounter("/scheduler/count/manual", 1, Duration.ofSeconds(3)); // assert JobDefinition type scheduler assertCounter("/scheduler/count/job-definition", 1, Duration.ofSeconds(1)); @@ -53,6 +53,7 @@ public void quartzSpanTest() { private void assertCounter(String counterPath, int expectedCount, Duration timeout) { await().atMost(timeout) + .pollInterval(Duration.ofMillis(500)) .until(() -> { Response response = given().when().get(counterPath); int code = response.statusCode(); diff --git a/integration-tests/opentelemetry-scheduler/src/test/java/io/quarkus/it/opentelemetry/scheduler/OpenTelemetrySchedulerTest.java b/integration-tests/opentelemetry-scheduler/src/test/java/io/quarkus/it/opentelemetry/scheduler/OpenTelemetrySchedulerTest.java index c33b61ccff386..28652a8ddd4c5 100644 --- a/integration-tests/opentelemetry-scheduler/src/test/java/io/quarkus/it/opentelemetry/scheduler/OpenTelemetrySchedulerTest.java +++ b/integration-tests/opentelemetry-scheduler/src/test/java/io/quarkus/it/opentelemetry/scheduler/OpenTelemetrySchedulerTest.java @@ -28,9 +28,9 @@ public class OpenTelemetrySchedulerTest { @Test public void schedulerSpanTest() { // ensure that scheduled job is called - assertCounter("/scheduler/count", 1, Duration.ofSeconds(1)); + assertCounter("/scheduler/count", 1, Duration.ofSeconds(3)); // assert JobDefinition type scheduler - assertCounter("/scheduler/count/job-definition", 1, Duration.ofSeconds(1)); + assertCounter("/scheduler/count/job-definition", 1, Duration.ofSeconds(3)); // ------- SPAN ASSERTS ------- List> spans = getSpans(); @@ -48,6 +48,7 @@ public void schedulerSpanTest() { private void assertCounter(String counterPath, int expectedCount, Duration timeout) { await().atMost(timeout) + .pollInterval(Duration.ofMillis(500)) .until(() -> { Response response = given().when().get(counterPath); int code = response.statusCode();