Skip to content

Allow extensions and extensions-jvm module tests to be run with alternate BOMs#8882

Merged
jamesnetherton merged 1 commit into
apache:mainfrom
JinyuChen97:allow-other-modules-tests-to-run-with-boms
Jul 21, 2026
Merged

Allow extensions and extensions-jvm module tests to be run with alternate BOMs#8882
jamesnetherton merged 1 commit into
apache:mainfrom
JinyuChen97:allow-other-modules-tests-to-run-with-boms

Conversation

@JinyuChen97

@JinyuChen97 JinyuChen97 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Migrate QuarkusUnitTest-based tests that cover interoperability with Quarkus or non-Camel transitives out of the deployment modules and into their respective integration-tests modules using @QuarkusTest + TestProfile, so that they can be exercised when running the test suite against alternate Quarkus platform BOMs.

quartz (integration-tests/quartz):

Migrated:

  • QuartzNotAutowiredTest
  • QuartzNoQuarkusSchedulerAutowiredTest
  • QuartzQuarkusSchedulerAutowiredTest
  • QuartzQuarkusSchedulerNotAutowiredTest
  • QuartzQuarkusCustomSchedulerAutowiredTest
  • QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest

Not migrated:

  • QuartzQuarkusSchedulerAmbiguousAutowiredTest
    (startup failure asserted via setExpectedException, no @QuarkusTest equivalent)

@JinyuChen97
JinyuChen97 force-pushed the allow-other-modules-tests-to-run-with-boms branch 2 times, most recently from 7ade5db to 2d4e635 Compare July 16, 2026 13:38
@apupier
apupier requested a review from jamesnetherton July 16, 2026 14:29
@JinyuChen97
JinyuChen97 force-pushed the allow-other-modules-tests-to-run-with-boms branch from 2d4e635 to 97fc11d Compare July 17, 2026 14:22
@jamesnetherton

Copy link
Copy Markdown
Contributor

I've not done a deep review (yet), but I think you could simplify things a lot and just copy the tests as-is and add quarkus-junit-internal to the relevant integration-test module(s) (it may actually already be there transitively).

The problem with reimplementing the tests as @QuarkusTest is that you need a bunch of extra test profiles. And that slows things down because you end up restarting the app multiple times.

@JinyuChen97

Copy link
Copy Markdown
Contributor Author

I've not done a deep review (yet), but I think you could simplify things a lot and just copy the tests as-is and add quarkus-junit-internal to the relevant integration-test module(s) (it may actually already be there transitively).

The problem with reimplementing the tests as @QuarkusTest is that you need a bunch of extra test profiles. And that slows things down because you end up restarting the app multiple times.

Thanks for the feedback, this is also my concern as well. Since each of migrated test has slightly different application properties, so they can't easily share the same profile. But I'm also wondering if we migrate them as QuarkusUnitTest, for each QuarkusUnitTest, they will start a new quarkus instance, will that also put pressure on CI maintain?

I actually tried moving the QuarkusUnitTest tests directly into integration-test modules, there is an issue when running QuarkusUnitTest and QuarkusTest together caused some conflict exception in quarkus test framework, I need to modify the maven-surefire-plugin to change the execution order of QuarkusUnitTest and QuarkusTest to let QuarkusUnitTest run first, then QuarkusTest to fix this error.

Thanks for any suggestion.

@jamesnetherton

Copy link
Copy Markdown
Contributor

I actually tried moving the QuarkusUnitTest tests directly into integration-test modules, there is an issue when running QuarkusUnitTest and QuarkusTest together caused some conflict exception in quarkus test framework, I need to modify the maven-surefire-plugin to change the execution order of QuarkusUnitTest and QuarkusTest to let QuarkusUnitTest run first, then QuarkusTest to fix this error.

Yes, you're right. I totally forgot the two things cannot easily coexist 😞.

Messing with the maven-surefire-plugin config and executions is not really what we want because we'd have to replicate it in the quarkus-platform.

Given the above & the requirement in the issue:

Consider only for tests covering interoperability with Quarkus or non-Camel transitives

I think we just simplify this PR to only migrating over the quartz tests. Arguably we could also migrate the the kafka tests. But, service binding is deprecated, thus it's probably not worth it for Kafka.

@JinyuChen97

Copy link
Copy Markdown
Contributor Author

No problem, thanks for your feedback, I will reduce the scope of the PR then.

…ration-tests/integration-tests-jvm

Migrate QuarkusUnitTest-based tests that cover interoperability with Quarkus
or non-Camel transitives out of the deployment modules and into their
respective integration-tests modules using @QuarkusTest + @testprofile, so that they can be exercised when
running the test suite against alternate Quarkus platform BOMs.

quartz (integration-tests/quartz):
- Migrated: QuartzNotAutowiredTest, QuartzNoQuarkusSchedulerAutowiredTest,
QuartzQuarkusSchedulerAutowiredTest, QuartzQuarkusSchedulerNotAutowiredTest,
QuartzQuarkusCustomSchedulerAutowiredTest,
QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest
- Not migrated: QuartzQuarkusSchedulerAmbiguousAutowiredTest
(startup failure asserted via setExpectedException, no @QuarkusTest equivalent)
@JinyuChen97
JinyuChen97 force-pushed the allow-other-modules-tests-to-run-with-boms branch from 97fc11d to 389e935 Compare July 20, 2026 16:04
@jamesnetherton
jamesnetherton merged commit 17f2854 into apache:main Jul 21, 2026
9 checks passed
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