From 6604dbe02ebbfd0c4954a7d0845f6df9e427b599 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Thu, 27 Aug 2026 06:49:42 +0200 Subject: [PATCH 1/2] Fix #2984: run the Citrus itests against the Kamelets in this working tree The integration tests were resolving the Kamelet catalog from a released camel-kamelets artifact instead of the one built in the same run, so a Kamelet change could not be caught by its own test. citrus.camel.cli.kamelets.version maps to the JBang system property camel-kamelets.version, which Camel JBang consumes as a *script* property via the //DEPS line in CamelJBang.java: //DEPS org.apache.camel.kamelets:camel-kamelets:${camel-kamelets.version:4.21.0} Citrus passes it with ProcessLauncher.withSystemProperty, which never reaches that substitution, so the run silently fell back to the released catalog and the integration dumps showed classpath:kamelets/*.kamelet.yaml. Citrus 5.0.0 also exposes citrus.camel.cli.kamelets.local.dir, which it turns into the Camel CLI's --local-kamelet-dir argument. Setting it to the repository kamelets/ directory makes catalog resolution deterministic and independent of artifact resolution: Camel puts the file: location ahead of the classpath one, so the working tree always wins. Verified locally with KafkaIT: - dumps now report file:/kamelets/.kamelet.yaml instead of classpath:kamelets/.kamelet.yaml - re-introducing the CamelKafkaOverrideTopic strip that #2978 originally carried now makes kafka-router-pipe-test FAIL, where it passed before this change Co-Authored-By: Claude Opus 5 (1M context) --- tests/camel-kamelets-itest/pom.xml | 2 ++ .../test/resources-filtered/citrus-application.properties | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/tests/camel-kamelets-itest/pom.xml b/tests/camel-kamelets-itest/pom.xml index 922f4370c..4b734d8bc 100644 --- a/tests/camel-kamelets-itest/pom.xml +++ b/tests/camel-kamelets-itest/pom.xml @@ -35,6 +35,8 @@ *IT + + ${project.basedir}/../../kamelets diff --git a/tests/camel-kamelets-itest/src/test/resources-filtered/citrus-application.properties b/tests/camel-kamelets-itest/src/test/resources-filtered/citrus-application.properties index 033b35468..cec34f39a 100644 --- a/tests/camel-kamelets-itest/src/test/resources-filtered/citrus-application.properties +++ b/tests/camel-kamelets-itest/src/test/resources-filtered/citrus-application.properties @@ -28,6 +28,13 @@ citrus.camel.cli.max.attempts=10 citrus.camel.cli.version=${camel.version} # Kamelets version (should point to the current snapshot release version) citrus.camel.cli.kamelets.version=${project.version} +# Load the Kamelets from this working tree rather than from a resolved +# camel-kamelets artifact, so the tests actually exercise the catalog built in +# the same run. The version property above is not sufficient on its own: Camel +# JBang consumes camel-kamelets.version as a JBang script property (the //DEPS +# line in CamelJBang.java), which Citrus' system property cannot reach, so the +# run silently falls back to the released catalog. See #2984. +citrus.camel.cli.kamelets.local.dir=${kamelets.local.dir} # Enable dump of Camel CLI integration output citrus.camel.cli.dump.integration.output=true From b14a87ad84d1e4e706c82011c331a2680f74e756 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Thu, 27 Aug 2026 11:38:36 +0200 Subject: [PATCH 2/2] Fix #2984: pin the mail-sink test to plaintext SMTP First regression the restored gate catches, and it was already on main. #2956 changed mail-sink to default protocol: smtps (implicit TLS), which is right for real deployments. The Citrus mail server this test starts is plaintext, so the sink can no longer complete a handshake against it and the test times out waiting on mailServer.inbound. It went unnoticed because the itests were resolving the released catalog, where mail-sink still defaulted to smtp -- exactly the blind spot this branch removes. Pinning protocol: smtp in the Pipe keeps the secure default for users and makes the test's plaintext assumption explicit rather than accidental. MailIT passes locally with this change. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/test/resources/mail/mail-sink-pipe.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-pipe.yaml b/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-pipe.yaml index c021891a6..baba0f504 100644 --- a/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-pipe.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-pipe.yaml @@ -33,6 +33,11 @@ spec: kind: Kamelet name: mail-sink properties: + # The Citrus mail server this test starts is a plaintext SMTP server, so + # the protocol has to be pinned. mail-sink defaults to smtps (implicit + # TLS) since #2956, which is the right default for real deployments but + # cannot complete a handshake against the mock. + protocol: "smtp" connectionHost: "{{mail.host}}" connectionPort: "{{mail.port}}" username: "{{mail.username}}"