replace deprecated methods CamelTestSupport.sendBody - #25249
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Signed-off-by: Aurélien Pupier <apupier@ibm.com>
0b39eec to
4d0d086
Compare
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 18 tested, 0 compile-only — current: 82 all testedMaveniverse Scalpel detected 18 affected modules (current approach: 82). Modules only in current approach (64)
Skip-tests mode would test 18 modules (18 direct + 0 downstream), skip tests for 0 (generated code, meta-modules) Modules Scalpel would test (18)
Build reactor — dependencies compiled but only changed modules were tested (18 modules)
|
gnodet
left a comment
There was a problem hiding this comment.
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).
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.