Skip to content

Unable to run QuarkusTests in Eclipse since Quarkus 3.22 #47656

@manofthepeace

Description

@manofthepeace

Describe the bug

In Eclipse IDE, Right click on a file Run As-> Junit fails with the followiing;

java.lang.RuntimeException: Internal error. The test class class org.acme.GreetingResourceTest should have been loaded with a QuarkusClassLoader, but instead it was loaded with jdk.internal.loader.ClassLoaders$AppClassLoader@63c12fb0. This is caused by the FacadeClassLoader not correctly identifying this class as a QuarkusTest.
	at io.quarkus.test.junit.QuarkusTestExtension.getClassLoaderFromTestClass(QuarkusTestExtension.java:337)
	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:631)
	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:712)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

Runnin a single test from a @QuarkuTest works

Expected behavior

Running a full file works

Actual behavior

Exceptions happens

How to Reproduce?

reproduder: code.quarkus.io and download the default project

Steps to reproduce
1 - Import the maven project into eclipse
2- right click on the test class in the package explorer, or on the class name within the editor
3- Run As-> Junit Test

Output of uname -a or ver

Darwin Kernel Version 24.4.0

Output of java -version

Temurin-21.0.7+6

Quarkus version or git rev

22.0.1

Build tool (ie. output of mvnw --version or gradlew --version)

mvn 3.9.9

Additional information

Running a single test seem to work ok.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions