Skip to content

CAMEL-19551: camel-jpa ensure tests have assertions#23768

Closed
gbhavya07 wants to merge 0 commit into
apache:mainfrom
gbhavya07:CAMEL-19551-test-assertions
Closed

CAMEL-19551: camel-jpa ensure tests have assertions#23768
gbhavya07 wants to merge 0 commit into
apache:mainfrom
gbhavya07:CAMEL-19551-test-assertions

Conversation

@gbhavya07

Copy link
Copy Markdown
Contributor

Description

Adds explicit assertions for startup operations in camel-jpa tests.

Several tests invoked consumer.start() or context.start() without directly asserting successful execution. This change wraps those operations with assertDoesNotThrow, making the expected startup behavior explicit and improving test clarity.

Updated tests:

  • AbstractJpaMethodTest
  • JpaTest
  • JpaWithNamedQueryTest
  • JpaWithNamedQueryAndParametersTest
  • JpaIdempotentConsumerTest

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

Validation:

  • Ran ./mvnw -pl components/camel-jpa -DskipITs test
  • Tests run: 96
  • 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.

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

all the modified tests already have assertions. I'm not sure it is adding a lot of clarity in these cases.

@gbhavya07 gbhavya07 closed this Jun 7, 2026
@gbhavya07
gbhavya07 force-pushed the CAMEL-19551-test-assertions branch from 333f679 to 37cdfb5 Compare June 7, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants