Skip to content

CAMEL-19551: add assertions to JPA transacted tests#23814

Merged
davsclaus merged 1 commit into
apache:mainfrom
gbhavya07:CAMEL-19551-test-assertions
Jun 7, 2026
Merged

CAMEL-19551: add assertions to JPA transacted tests#23814
davsclaus merged 1 commit into
apache:mainfrom
gbhavya07:CAMEL-19551-test-assertions

Conversation

@gbhavya07
Copy link
Copy Markdown
Contributor

Description

Addresses CAMEL-19551 by adding explicit assertions to JPA transacted tests that previously executed routes without verifying any observable outcome.

The following tests did not contain assertions:

  • testTransactedMulticast
  • testTransactedRecipientList
  • testTransactedEnrich

Each test now verifies that the expected entities are persisted in the database after route execution using assertEntityInDB(2).

This improves test clarity and aligns the tests with the goal of CAMEL-19551, ensuring tests contain meaningful assertions rather than only executing code paths.

This is a test-only change and does not modify component behavior.

Validation:

Ran:

./mvnw -pl components/camel-jpa -Dtest=JpaTransactedTest test

Results:

  • Tests run: 4
  • Failures: 0
  • Errors: 0

Target

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

Tracking

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.

  • I ran the relevant module tests locally and verified they pass.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

🌟 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

🧪 CI tested the following changed modules:

  • components/camel-jpa

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

  • components/camel-jpa: 3 test(s) disabled on GitHub Actions
All tested modules (8 modules)
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JPA
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@davsclaus davsclaus merged commit 37f9d5a into apache:main Jun 7, 2026
5 checks passed
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