Guillaume Nodet created CAMEL-23884:
---------------------------------------
Summary: Fix flaky NatsConsumerWithRedeliveryIT by using Awaitility
Key: CAMEL-23884
URL: https://issues.apache.org/jira/browse/CAMEL-23884
Project: Camel
Issue Type: Bug
Components: camel-nats
Reporter: Guillaume Nodet
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)