This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 106f84d29c4d CAMEL-23676: Fix NatsProducerReplyToIT and
NatsConsumerWithRedeliveryIT (#23811)
106f84d29c4d is described below
commit 106f84d29c4dc9bf1cd4bb8e07c036bec08eb585
Author: Adriano Machado <[email protected]>
AuthorDate: Sun Jun 7 02:23:26 2026 -0400
CAMEL-23676: Fix NatsProducerReplyToIT and NatsConsumerWithRedeliveryIT
(#23811)
Both tests broke after CAMEL-23676 changed NatsConsumer to only publish
a reply when the exchange pattern is InOut.
- NatsProducerReplyToIT: add ?exchangePattern=InOut to the consumer URI
so the consumer creates InOut exchanges and publishes the reply.
- NatsConsumerWithRedeliveryIT: switch from requestBody to sendBody since
the test only asserts mock delivery, not reply content. This avoids the
request/reply handshake entirely.
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
.../component/nats/integration/NatsConsumerWithRedeliveryIT.java | 4 ++--
.../camel/component/nats/integration/NatsProducerReplyToIT.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsConsumerWithRedeliveryIT.java
b/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsConsumerWithRedeliveryIT.java
index 6f6c1d0993ca..45cdb7abb371 100644
---
a/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsConsumerWithRedeliveryIT.java
+++
b/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsConsumerWithRedeliveryIT.java
@@ -38,8 +38,8 @@ public class NatsConsumerWithRedeliveryIT extends
NatsITSupport {
mockResultEndpoint.setExpectedMessageCount(1);
mockResultEndpoint.setAssertPeriod(1000);
- template.requestBody("direct:send", "test");
- template.requestBody("direct:send", "golang");
+ template.sendBody("direct:send", "test");
+ template.sendBody("direct:send", "golang");
exception.setExpectedMessageCount(1);
diff --git
a/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsProducerReplyToIT.java
b/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsProducerReplyToIT.java
index 4ad97e89c191..7a012494dcf6 100644
---
a/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsProducerReplyToIT.java
+++
b/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsProducerReplyToIT.java
@@ -53,7 +53,7 @@ public class NatsProducerReplyToIT extends NatsITSupport {
public void configure() {
from(startUri).to(middleUri).to(resultUri);
- from(middleUri)
+ from(middleUri + "?exchangePattern=InOut")
.transform(simple("Bye ${body}"));
}
};