Skip to content

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

Open
gbhavya07 wants to merge 1 commit into
apache:mainfrom
gbhavya07:CAMEL-19551-test-assertions
Open

CAMEL-19551: camel-jpa ensure tests have assertions#23768
gbhavya07 wants to merge 1 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.

Copy link
Copy Markdown
Contributor

@apupier apupier left a comment

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.

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