You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a class from a provided scoped dependency in a test (in whichever way) results in a ClassNotFoundException when the test is run in continuous testing mode.
Expected behavior
Class is found, just like when surefire is running the test.
mvn clean verify does not fail (ProvidedTest passes)
mvn quarkus:dev
resume tests
fails with:
ERROR [io.qua.test] (Test runner thread) Test ProvidedTest#load() failed: java.lang.NoClassDefFoundError: lombok/experimental/SuperBuilder
at org.acme.ProvidedTest.load(ProvidedTest.java:11)
Caused by: java.lang.ClassNotFoundException: lombok.experimental.SuperBuilder
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:455)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:405)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:455)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:405)
... 1 more
lombok might be a strange example, but in my real project I have a test based on javaparser that verifies the expected usage of lombok annotations (which have source retention, so ArchUnit is not usable here).
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.1.Final
Build tool (ie. output of mvnw --version or gradlew --version)
@aloubyansky it looks like the 'provided' scoped dep is not ending up in the model, but for the 'mvn verify' use case it is on the class path so can be loaded from the system CL.
Describe the bug
Using a class from a
provided
scoped dependency in a test (in whichever way) results in aClassNotFoundException
when the test is run in continuous testing mode.Expected behavior
Class is found, just like when surefire is running the test.
Actual behavior
ClassNotFoundException
How to Reproduce?
q_ct-provided.zip
mvn clean verify
does not fail (ProvidedTest
passes)mvn quarkus:dev
lombok might be a strange example, but in my real project I have a test based on
javaparser
that verifies the expected usage of lombok annotations (which have source retention, so ArchUnit is not usable here).Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.8.4
Additional information
Probably related:
quarkus/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java
Lines 196 to 201 in 7236639
The text was updated successfully, but these errors were encountered: