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/06 14:19:00 UTC
[jira] [Resolved] (CAMEL-23884) Fix flaky NatsConsumerWithRedeliveryIT by using Awaitility
[ https://issues.apache.org/jira/browse/CAMEL-23884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved CAMEL-23884.
-------------------------------------
Resolution: Fixed
> Fix flaky NatsConsumerWithRedeliveryIT by using Awaitility
> ----------------------------------------------------------
>
> Key: CAMEL-23884
> URL: https://issues.apache.org/jira/browse/CAMEL-23884
> Project: Camel
> Issue Type: Test
> Components: camel-nats
> Reporter: Guillaume Nodet
> Priority: Minor
> Fix For: 4.22.0
>
>
> NatsConsumerWithRedeliveryIT.testConsumer fails intermittently in CI with:
> {code}
> mock://exception Received message count. Expected: <1> but was: <0>
> {code}
> Root cause: mock expectations for the exception endpoint were set after messages were sent, creating a latch race with the async NATS consumer. Additionally, the default 10-second latch wait could expire on loaded CI servers.
> Fix: move all setExpectedMessageCount calls before message sends and replace fixed-timing assertIsSatisfied/assertPeriod calls with Awaitility.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)