This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 2b48380b86a Flaky test on slow CI
2b48380b86a is described below

commit 2b48380b86a33cbfb9e55a85ac9b384eca39f888
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu May 1 07:48:22 2025 +0200

    Flaky test on slow CI
---
 .../camel/component/paho/PahoReconnectAfterFailureIT.java   | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-paho/src/test/java/org/apache/camel/component/paho/PahoReconnectAfterFailureIT.java
 
b/components/camel-paho/src/test/java/org/apache/camel/component/paho/PahoReconnectAfterFailureIT.java
index 34751f2bd0a..b9058d04c6c 100644
--- 
a/components/camel-paho/src/test/java/org/apache/camel/component/paho/PahoReconnectAfterFailureIT.java
+++ 
b/components/camel-paho/src/test/java/org/apache/camel/component/paho/PahoReconnectAfterFailureIT.java
@@ -37,6 +37,7 @@ import 
org.apache.camel.test.infra.core.annotations.ContextFixture;
 import org.apache.camel.test.infra.core.annotations.RouteFixture;
 import org.apache.camel.test.infra.core.api.ConfigurableContext;
 import org.apache.camel.test.infra.core.api.ConfigurableRoute;
+import org.awaitility.Awaitility;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
@@ -118,9 +119,13 @@ public class PahoReconnectAfterFailureIT implements 
ConfigurableRoute, Configura
         // Start broker and wait for supervisor to restart route
         // consumer should now connect
         startBroker();
-        routeStartedLatch.await(5, TimeUnit.SECONDS);
-        assertEquals(ServiceStatus.Started, 
routeController.getRouteStatus(TESTING_ROUTE_ID),
-                "Expecting consumer connected to broker and route started");
+
+        routeStartedLatch.await(10, TimeUnit.SECONDS);
+
+        Awaitility.await().untilAsserted(() -> {
+            assertEquals(ServiceStatus.Started, 
routeController.getRouteStatus(TESTING_ROUTE_ID),
+                    "Expecting consumer connected to broker and route 
started");
+        });
 
         // Given
         String msg = "msg";
@@ -148,7 +153,7 @@ public class PahoReconnectAfterFailureIT implements 
ConfigurableRoute, Configura
         }
 
         startBroker();
-        routeStartedLatch.await(5, TimeUnit.SECONDS);
+        routeStartedLatch.await(10, TimeUnit.SECONDS);
 
         template.sendBody("direct:test", msg);
 

Reply via email to