This is an automated email from the ASF dual-hosted git repository. JiriOndrusek pushed a commit to branch camel-main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit a307ac071ddcce42378f7b39e5b24b031d434913 Author: jiriOndrusek-agent <[email protected]> AuthorDate: Thu Oct 22 08:47:00 2026 +0000 Use the pubnub override channel header in the pubnub tests Since CAMEL-25888 the producer ignores CamelPubNubChannel and publishes to its configured channel unless CamelPubNubOverrideChannel is set, so the test published to "overridden" instead of "test". It passed with WireMock only because another test stubs every publish path. Verify the publish channel too. Co-Authored-By: Claude Opus 5.5 <[email protected]> --- .../org/apache/camel/quarkus/component/pubnub/it/PubnubResource.java | 2 +- .../org/apache/camel/quarkus/component/pubnub/it/PubnubTest.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/integration-tests/pubnub/src/main/java/org/apache/camel/quarkus/component/pubnub/it/PubnubResource.java b/integration-tests/pubnub/src/main/java/org/apache/camel/quarkus/component/pubnub/it/PubnubResource.java index 1871e20927..e6c1d8e06a 100644 --- a/integration-tests/pubnub/src/main/java/org/apache/camel/quarkus/component/pubnub/it/PubnubResource.java +++ b/integration-tests/pubnub/src/main/java/org/apache/camel/quarkus/component/pubnub/it/PubnubResource.java @@ -78,7 +78,7 @@ public class PubnubResource { if (channel.equals("test")) { context.getRouteController().startRoute("subscriber-route"); } - producerTemplate.sendBodyAndHeader("direct:publish", message, PubNubConstants.CHANNEL, channel); + producerTemplate.sendBodyAndHeader("direct:publish", message, PubNubConstants.OVERRIDE_CHANNEL, channel); return Response.created(new URI("https://camel.apache.org")).build(); } diff --git a/integration-tests/pubnub/src/test/java/org/apache/camel/quarkus/component/pubnub/it/PubnubTest.java b/integration-tests/pubnub/src/test/java/org/apache/camel/quarkus/component/pubnub/it/PubnubTest.java index ce07239ef7..484287936c 100644 --- a/integration-tests/pubnub/src/test/java/org/apache/camel/quarkus/component/pubnub/it/PubnubTest.java +++ b/integration-tests/pubnub/src/test/java/org/apache/camel/quarkus/component/pubnub/it/PubnubTest.java @@ -26,6 +26,7 @@ import org.junit.jupiter.api.Test; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.matchesPattern; @@ -66,6 +67,10 @@ class PubnubTest { .then() .statusCode(201); + if (server != null) { + server.verify(postRequestedFor(urlPathMatching("/publish/(.*)/(.*)/0/test/0"))); + } + // Subscribe and consume the message RestAssured.get("/pubnub/subscribe") .then()
