snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

JUnit Extension is loaded with wrong classloader inside @QuarkusTest #135

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 4 years ago

Describe the bug (Describe the problem clearly and concisely.) When using an custom JUnit extension the classloader for the extension is different then the classloader for the actual test. This is only inside @QuarkusTest annotated tests.

Expected behavior (Describe the expected behavior clearly and concisely.) Same classloader as test.

Actual behavior (Describe the actual behavior clearly and concisely.) Different classloader (AppClassLoader vs. Base Runtime Classloader)

To Reproduce Steps to reproduce the behavior:

https://github.com/tkalmar/bug-with-quarkus

org.acme.ExampleResourceTest fails because of the class loading issue org.acme.StaticProviderTest shows the expected and in my opinion correct behaviour.

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Additional context (Add any other context about the problem here.)


https://github.com/quarkusio/quarkus/issues/10623


$upstream:10623$