[
https://issues.apache.org/jira/browse/CAMEL-23980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-23980:
--------------------------------
Priority: Minor (was: Major)
> Flaky test: JmsAddAndRemoveRouteManagementIT (14% failure rate on Develocity)
> -----------------------------------------------------------------------------
>
> Key: CAMEL-23980
> URL: https://issues.apache.org/jira/browse/CAMEL-23980
> Project: Camel
> Issue Type: Test
> Components: camel-jms
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Minor
> Labels: test-flaky
>
> The integration test {{JmsAddAndRemoveRouteManagementIT}} is flaky with a 14%
> failure rate on Develocity (45 failures out of 323 runs).
> *Root cause:*
> Race condition between route Started status and JMS consumer readiness. After
> {{addRoutes()}}, the test waits for the JMX thread pool to appear, then
> immediately sends a message. However, thread pool registration in JMX does
> not guarantee the JMS consumer has subscribed to the broker yet. When the
> consumer subscription is delayed (common on slow CI), the message sits in the
> queue and the {{MockEndpoint}} assertion times out with its default 10-second
> wait.
> *Fix:*
> # Wait for {{ServiceStatus.Started}} via Awaitility after the thread pool
> check (stronger signal than JMX registration alone)
> # Increase {{MockEndpoint.setResultWaitTime()}} to 30 seconds to accommodate
> the asynchronous JMS consumer subscription
> *File:*
> {{components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/JmsAddAndRemoveRouteManagementIT.java}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)