Skip to content

camel-test-junit6: Make more test configuration methods public for framework extensibility#23729

Open
jamesnetherton wants to merge 1 commit into
apache:mainfrom
jamesnetherton:more-public-test-config
Open

camel-test-junit6: Make more test configuration methods public for framework extensibility#23729
jamesnetherton wants to merge 1 commit into
apache:mainfrom
jamesnetherton:more-public-test-config

Conversation

@jamesnetherton

Copy link
Copy Markdown
Contributor

Motivation for this is to clean up and remove some old hacks in the Camel Quarkus test framework.

…amework extensibility

Changed protected methods to public in CamelContextConfiguration and
TestExecutionConfiguration to allow external test frameworks (e.g.
Camel Quarkus) to extend base test classes.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 3, 2026

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 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • components/camel-test/camel-test-junit6

ℹ️ 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.


⚙️ View full build and test results

*/
@Deprecated(since = "4.7.0")
protected TestExecutionConfiguration withCreateCamelContextPerClass(boolean createCamelContextPerClass) {
public TestExecutionConfiguration withCreateCamelContextPerClass(boolean createCamelContextPerClass) {

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.

do we really want to make public a deprecated method?
Shouldn't we try to not use it at all on Camel Quarkus side?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure of the history around it, but the API is somewhat incoherent. withCreateCamelContextPerClass is deprecated. But, isCreateCamelContextPerClass is not deprecated and is referenced in a few places that seem to be critical for the CQ test framework in some scenarios.

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.

if I remember well, it was @orpiske which did the major work on the tests. @orpiske do you remember about this part? Any advice how to avoid the deprecated method?

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.

3 participants