[
https://issues.apache.org/jira/browse/CAMEL-23884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-23884:
--------------------------------
Issue Type: Test (was: Bug)
> 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
>
> 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)