Skip to content

replace deprecated methods CamelTestSupport.sendBody - #25249

Merged
apupier merged 1 commit into
apache:mainfrom
apupier:replaceDeprecatedSendBody
Jul 31, 2026
Merged

replace deprecated methods CamelTestSupport.sendBody#25249
apupier merged 1 commit into
apache:mainfrom
apupier:replaceDeprecatedSendBody

Conversation

@apupier

@apupier apupier commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

AI-assisted contributions

  • If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., Co-authored-by trailers) and the PR description identifies the AI tool used.

@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

Signed-off-by: Aurélien Pupier <apupier@ibm.com>
@apupier
apupier force-pushed the replaceDeprecatedSendBody branch from 0b39eec to 4d0d086 Compare July 30, 2026 14:37
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • components/camel-bean-validator
  • components/camel-crypto
  • components/camel-google/camel-google-drive
  • components/camel-groovy
  • components/camel-influxdb
  • components/camel-influxdb2
  • components/camel-jaxb
  • components/camel-jcache
  • components/camel-jgroups
  • components/camel-jolt
  • components/camel-jslt
  • components/camel-json-patch
  • components/camel-jsonata
  • components/camel-jsonpath
  • components/camel-jt400
  • components/camel-kudu
  • components/camel-netty
  • components/camel-spring-parent/camel-spring-batch

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.


🔬 Scalpel shadow comparison — Scalpel: 18 tested, 0 compile-only — current: 82 all tested

Maveniverse Scalpel detected 18 affected modules (current approach: 82).

Modules only in current approach (64)
  • camel-a2a
  • camel-as2
  • camel-atmosphere-websocket
  • camel-clickup
  • camel-consul
  • camel-cxf-rest
  • camel-cxf-soap
  • camel-cxf-spring-rest
  • camel-cxf-spring-soap
  • camel-cxf-spring-transport
  • camel-cxf-transport
  • camel-fhir
  • camel-hl7
  • camel-iso8583
  • camel-java-joor-dsl
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-jetty
  • camel-jetty-common
  • camel-kamelet
  • camel-knative-http
  • camel-launcher-container
  • camel-lra
  • camel-micrometer-observability
  • camel-micrometer-prometheus
  • camel-netty-http
  • camel-oauth
  • camel-observability-services
  • camel-once
  • camel-openapi-validator
  • camel-opentelemetry
  • camel-opentelemetry2
  • camel-platform-http-main
  • camel-platform-http-vertx
  • camel-pqc
  • camel-quickfix
  • camel-rest-openapi
  • camel-restdsl-openapi-plugin
  • camel-servlet
  • camel-slack
  • camel-soap
  • camel-spring-ws
  • camel-stax
  • camel-syslog
  • camel-telegram
  • camel-telemetry
  • camel-telemetry-dev
  • camel-test-main-junit5
  • camel-test-main-junit6
  • camel-undertow
  • camel-undertow-spring-security
  • camel-vertx-http
  • camel-webhook
  • camel-whatsapp
  • camel-xml-io-dsl
  • camel-xml-jaxb-dsl
  • camel-xml-jaxb-dsl-test-definition
  • camel-xml-jaxb-dsl-test-spring
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
  • camel-zookeeper

Skip-tests mode would test 18 modules (18 direct + 0 downstream), skip tests for 0 (generated code, meta-modules)

Modules Scalpel would test (18)
  • camel-bean-validator
  • camel-crypto
  • camel-google-drive
  • camel-groovy
  • camel-influxdb
  • camel-influxdb2
  • camel-jaxb
  • camel-jcache
  • camel-jgroups
  • camel-jolt
  • camel-jslt
  • camel-json-patch
  • camel-jsonata
  • camel-jsonpath
  • camel-jt400
  • camel-kudu
  • camel-netty
  • camel-spring-batch

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • components/camel-netty: 1 test(s) disabled on GitHub Actions
Build reactor — dependencies compiled but only changed modules were tested (18 modules)
  • Camel :: Bean validator
  • Camel :: Crypto
  • Camel :: Google :: Drive
  • Camel :: Groovy
  • Camel :: InfluxDB
  • Camel :: InfluxDB2
  • Camel :: JAXB
  • Camel :: JCache
  • Camel :: JGroups
  • Camel :: JSONATA
  • Camel :: JSon Path
  • Camel :: Java Toolbox for IBM i
  • Camel :: Jolt
  • Camel :: Jslt
  • Camel :: JsonPatch (deprecated)
  • Camel :: Kudu
  • Camel :: Netty
  • Camel :: Spring Batch

⚙️ View full build and test results

@apupier
apupier marked this pull request as ready for review July 30, 2026 19:15

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code on behalf of Guillaume Nodet

Clean, correct mechanical transformation replacing deprecated CamelTestSupport.sendBody() calls (deprecated since 4.7.0) with the recommended TestSupport.sendBody(template, ...) across 48 test files. CI is green.

The transformation is mechanically correct throughout — every sendBody("uri", body) is replaced with TestSupport.sendBody(template, "uri", body), and every variant with headers is similarly updated. The template field is a protected volatile ProducerTemplate inherited from AbstractTestSupport, so it is safely accessible in all subclasses.

This covers a subset of the remaining deprecated sendBody usage — incremental cleanup is the right approach, consistent with prior contributions (e.g., PR #24499 for camel-lra).

@apupier
apupier merged commit 0886735 into apache:main Jul 31, 2026
5 checks passed
@apupier
apupier deleted the replaceDeprecatedSendBody branch July 31, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants