This is an automated email from the ASF dual-hosted git repository.
gnodet 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 148ac28d67cb CAMEL-24031: Fix flaky JmsAddAndRemoveRouteManagementIT
(#24632)
148ac28d67cb is described below
commit 148ac28d67cb45f711dcdabb16e5dd1d8839d930
Author: Guillaume Nodet <[email protected]>
AuthorDate: Sun Jul 12 22:59:56 2026 +0200
CAMEL-24031: Fix flaky JmsAddAndRemoveRouteManagementIT (#24632)
CAMEL-24031: Fix flaky JmsAddAndRemoveRouteManagementIT
Increase Awaitility timeouts from 5s to 30s for JMX thread pool
registration and cleanup checks on slow CI.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
.../jms/integration/JmsAddAndRemoveRouteManagementIT.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/JmsAddAndRemoveRouteManagementIT.java
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/JmsAddAndRemoveRouteManagementIT.java
index 082dafd56f86..8319355dd48a 100644
---
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/JmsAddAndRemoveRouteManagementIT.java
+++
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/JmsAddAndRemoveRouteManagementIT.java
@@ -90,9 +90,10 @@ public class JmsAddAndRemoveRouteManagementIT extends
AbstractJMSTest {
}
});
- // Wait for the new route's thread pool to be registered and identify
it
+ // Wait for the new route's thread pool to be registered and identify
it.
+ // JMX registration can be slow on CI, so use a generous timeout.
AtomicReference<Set<ObjectName>> duringRef = new AtomicReference<>();
- Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
+ Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
Set<ObjectName> during = mbeanServer.queryNames(query, null);
Set<ObjectName> added = new HashSet<>(during);
added.removeAll(before);
@@ -117,8 +118,9 @@ public class JmsAddAndRemoveRouteManagementIT extends
AbstractJMSTest {
context.getRouteController().stopRoute("myNewRoute");
context.removeRoute("myNewRoute");
- // Verify the thread pools from the removed route are cleaned up
- Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
+ // Verify the thread pools from the removed route are cleaned up.
+ // Cleanup can be slow on CI, so use a generous timeout.
+ Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
Set<ObjectName> after = mbeanServer.queryNames(query, null);
for (ObjectName added : addedPools) {
Assertions.assertFalse(after.contains(added),