Skip to content

CAMEL-23652: Add tests for bean EIP ref with local template beans#23650

Open
davsclaus wants to merge 1 commit into
mainfrom
CAMEL-23652-bean-ref-test
Open

CAMEL-23652: Add tests for bean EIP ref with local template beans#23650
davsclaus wants to merge 1 commit into
mainfrom
CAMEL-23652-bean-ref-test

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

  • Add test coverage for using bean: ref: "{{beanName}}" to reference local template beans in kamelets and route templates
  • Tests verify the scenario reported in CAMEL-23652 where bean EIP ref references a template-scoped bean
  • Both tests pass, confirming this works correctly in the current codebase

Tests Added

  • KameletTest"kamelet (definition with local bean via bean ref)": Tests bean: ref: "{{myCounter}}" in a YAML routeTemplate with an AtomicInteger template bean
  • KameletLoaderTest"kamelet with local bean via bean ref": Tests the full kamelet YAML format (apiVersion/kind/spec) with template.beans defining an AtomicInteger with constructor parameter {{start}}, and bean: ref: "{{counter}}" referencing it — matching the exact scenario from the JIRA issue

Test plan

  • mvn test -pl dsl/camel-yaml-dsl/camel-yaml-dsl -Dtest="KameletLoaderTest,KameletTest" — all 23 tests pass

Claus Ibsen using Claude Code on behalf of Claus Ibsen

@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.

@github-actions github-actions Bot added the dsl label May 30, 2026
Co-Authored-By: Claude <noreply@anthropic.com>
@davsclaus davsclaus force-pushed the CAMEL-23652-bean-ref-test branch from b6a1a71 to 7a63ac4 Compare May 30, 2026 07:53
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-yaml-dsl/camel-yaml-dsl
All tested modules (8 modules)
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant