Skip to content

Conversation

holly-cummins
Copy link
Contributor

Resolves #47646

Most JUnit listeners can use the service loading mechanism, without needing a junit-platform.properties change. The one exception is a LauncherInterceptor. That's what the new code uses to inject a TCCL. However, after #47365, the 'main' TCCL-injecting happens using a discovery listener. There's also an adjustment that happens earlier, to support gradle (which doesn't load tests in the discovery phase). However, that adjustment doesn't need to be done using an interceptor, and it can use a normal session listener instead.

With this change, there are now two session listeners, one in junit5 and one in junit5-config. I looked into consolidating them, but that doesn't work, because some projects use only junit5-config. I've confirmed that the two listeners should work as expected, no matter which order they're invoked in.

This PR doesn't fix all problems that can be caused by user junit-platform.properties, just the most acute one. See #48125 for a discussion of the others.

Copy link

quarkus-bot bot commented May 29, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 6dea9ab.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
JVM Integration Tests - JDK 17 Build Failures Logs Raw logs 🔍
✔️ JVM Integration Tests - JDK 17 Windows Logs Raw logs 🔍
✔️ JVM Integration Tests - JDK 21 Logs Raw logs 🔍

Full information is available in the Build summary check run.
You can consult the Develocity build scans.

Failures

⚙️ JVM Integration Tests - JDK 17 #

- Failing: integration-tests/opentelemetry-grpc-only 

📦 integration-tests/opentelemetry-grpc-only

io.quarkus.it.opentelemetry.grpc.HelloGrpcClientTest.testHello - History - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:668)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:763)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)

@holly-cummins holly-cummins requested a review from geoand May 29, 2025 15:32
@geoand
Copy link
Contributor

geoand commented May 30, 2025

Seems reasonable but maybe @radcortez also wants to take a look

@holly-cummins holly-cummins merged commit 2964bf4 into quarkusio:main Jun 4, 2025
57 of 58 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.24 - main milestone Jun 4, 2025
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.

[Test][ClassLoader] Quarkus 3.22 throws when tests run with junit-platform.properties resource file

3 participants