You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2026/07/12 08:00:00 UTC

[jira] [Work started] (CAMEL-24021) Fix flaky VertxWebsocketHandshakeHeadersTest

     [ https://issues.apache.org/jira/browse/CAMEL-24021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-24021 started by Guillaume Nodet.
-----------------------------------------------
> Fix flaky VertxWebsocketHandshakeHeadersTest
> --------------------------------------------
>
>                 Key: CAMEL-24021
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24021
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-vertx-websocket
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> The test VertxWebsocketHandshakeHeadersTest.testHandshakeHeadersAsConsumer is flaky on CI. In the last 12 days, it has 8 failures and 7 flaky runs out of 295 total runs.
> Root cause: Race condition in testHandshakeHeadersAsConsumer where MockEndpoint expectations are set AFTER context.start() and after the CountDownLatch completes. Messages from the server can arrive and be consumed before the mock expectations are configured, causing assertion failures like:
> - "mock://result Message with body Hello World was expected but not found in [Ping]" (only one of two messages received)
> - "mock://result Received message count. Expected: <2> but was: <0>" (no messages received)
> Fix: Set up MockEndpoint expectations BEFORE starting the CamelContext, and use MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS) for timed assertions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)