Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misconfigured TCCL for @TestFactory dynamic tests breaks RestAssured since Quarkus 1.5.0 #10435

Closed
bertm opened this issue Jul 2, 2020 · 14 comments · Fixed by #43766
Closed
Labels
area/testing kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.
Milestone

Comments

@bertm
Copy link

bertm commented Jul 2, 2020

Describe the bug
RestAssured no longer initializes correctly when used in a dynamic test (@TestFactory with DynamicTest) due to a classloader mismatch. I discovered this when upgrading from 1.4.2.Final to 1.5.2.Final recently.

RestAssured uses the TCCL to initialize its Jackson ObjectMapper. In simple @Test test cases, and in the execution of the @TestFactory method, the TCCL is the Quarkus Base Runtime Classloader. During the execution of the dynamic test cases returned by the @TestFactory method, the TCCL is the system classloader since 1.5.0.

This leads to a mismatch between to RestAssured.class ClassLoader and the TCCL when RestAssured is used, leading to unexpected errors in test execution:

java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule not a subtype
	at org.acme.rest.json.DynamicQuarkusTest.lambda$test$0(DynamicQuarkusTest.java:18)

Expected behavior

  • RestAssured can be used in @TestFactory-produced dynamic test cases.
  • The TCCL during execution of @TestFactory-produced dynamic test cases is the same as when executing @Test test cases.

Actual behavior

  • RestAssured throws unexpected ServiceConfigurationError in @TestFactory-produced dynamic test cases.
  • The TCCL during execution of @TestFactory-produced dynamic test cases differs from the one during execution of @Test test cases.

To Reproduce
Steps to reproduce the behavior:

  1. Create simple REST Jackson starter project:
mvn io.quarkus:quarkus-maven-plugin:1.5.2.Final:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=rest-json-quickstart \
    -DclassName="org.acme.rest.json.FruitResource" \
    -Dpath="/fruits" \
    -Dextensions="resteasy-jackson" \
    -DplatformVersion=1.5.2.Final
  1. Add the following test:
package org.acme.rest.json;

import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory;

import static io.restassured.RestAssured.given;
import static org.junit.jupiter.api.DynamicTest.dynamicTest;

@QuarkusTest
public class DynamicQuarkusTest {

    @TestFactory
    public DynamicTest test() {
        return dynamicTest("restAssuredExample", () ->
            given()
                .body(new Data()) // Uses TCCL to load Jackson
        );
    }
    
    static class Data {
        public String data;
    }
}
  1. Run mvn clean verify
  2. Observe failure:
java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule not a subtype
	at org.acme.rest.json.DynamicQuarkusTest.lambda$test$0(DynamicQuarkusTest.java:18)

Configuration
Not applicable.

Environment (please complete the following information):

  • Output of uname -a or ver:
Linux laptop.local 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version: reproduced on various JREs, but here's one:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment GraalVM CE 19.3.1 (build 11.0.6+9-jvmci-19.3-b07)
OpenJDK 64-Bit Server VM GraalVM CE 19.3.1 (build 11.0.6+9-jvmci-19.3-b07, mixed mode, sharing)
  • GraalVM version (if different from Java): same as Java.
  • Quarkus version or git rev: 1.5.0.Final - 1.5.2.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/bertm/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 11.0.6, vendor: Oracle Corporation, runtime: /home/bertm/.sdkman/candidates/java/19.3.1.r11-grl
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-106-generic", arch: "amd64", family: "unix"

Additional context
The exact same test case works fine (that is, does nothing meaningful instead of throwing an error) on Quarkus 1.4.2. Substituting platformVersion=1.5.2.Final for platformVersion=1.4.2.Final in step 1. is sufficient to make the test succeed.

@bertm bertm added the kind/bug Something isn't working label Jul 2, 2020
@bertm bertm changed the title Misconfigured TCCL in @TestFactory dynamic tests breaks RestAssured since Quarkus 1.5.0 Misconfigured TCCL for @TestFactory dynamic tests breaks RestAssured since Quarkus 1.5.0 Jul 2, 2020
@bertm
Copy link
Author

bertm commented Jul 2, 2020

For your convenience, the full stack trace of the error (with trimStackTrace set to false in Surefire):

java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1236)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
	at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1063)
	at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1047)
	at com.fasterxml.jackson.databind.ObjectMapper.findAndRegisterModules(ObjectMapper.java:1097)
	at io.restassured.path.json.mapper.factory.DefaultJackson2ObjectMapperFactory.create(DefaultJackson2ObjectMapperFactory.java:29)
	at io.restassured.path.json.mapper.factory.DefaultJackson2ObjectMapperFactory.create(DefaultJackson2ObjectMapperFactory.java:27)
	at io.restassured.common.mapper.factory.ObjectMapperFactory$create.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
	at io.restassured.internal.mapping.Jackson2Mapper.createJackson2ObjectMapper(Jackson2Mapper.groovy:44)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:193)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
	at io.restassured.internal.mapping.Jackson2Mapper.serialize(Jackson2Mapper.groovy:50)
	at io.restassured.internal.mapping.Jackson2Mapper.serialize(Jackson2Mapper.groovy)
	at io.restassured.mapper.ObjectMapper$serialize.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
	at io.restassured.internal.mapping.ObjectMapping.serializeWithJackson2(ObjectMapping.groovy:209)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:149)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:100)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:240)
	at io.restassured.internal.mapping.ObjectMapping.serialize(ObjectMapping.groovy:133)
	at io.restassured.internal.mapping.ObjectMapping$serialize.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at io.restassured.internal.RequestSpecificationImpl.body(RequestSpecificationImpl.groovy:751)
	at org.acme.rest.json.DynamicQuarkusTest.lambda$test$0(DynamicQuarkusTest.java:18)
	at org.junit.jupiter.engine.descriptor.DynamicTestTestDescriptor.lambda$execute$0(DynamicTestTestDescriptor.java:52)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.api.extension.InvocationInterceptor.interceptDynamicTest(InvocationInterceptor.java:161)
	at org.junit.jupiter.engine.descriptor.DynamicTestTestDescriptor.lambda$execute$1(DynamicTestTestDescriptor.java:58)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptorCall.lambda$ofVoid$0(InvocationInterceptorChain.java:78)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.api.extension.InvocationInterceptor.interceptDynamicTest(InvocationInterceptor.java:161)
	at org.junit.jupiter.engine.descriptor.DynamicTestTestDescriptor.lambda$execute$1(DynamicTestTestDescriptor.java:58)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptorCall.lambda$ofVoid$0(InvocationInterceptorChain.java:78)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.descriptor.DynamicTestTestDescriptor.execute(DynamicTestTestDescriptor.java:57)
	at org.junit.jupiter.engine.descriptor.DynamicTestTestDescriptor.execute(DynamicTestTestDescriptor.java:31)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:198)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.junit.jupiter.engine.descriptor.TestFactoryTestDescriptor.lambda$invokeTestMethod$1(TestFactoryTestDescriptor.java:106)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestFactoryTestDescriptor.invokeTestMethod(TestFactoryTestDescriptor.java:93)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

@bertm
Copy link
Author

bertm commented Jul 2, 2020

Looks like Quarkus 1.6.0.Final has just been released.

Reproducible on 1.6.0.Final as well.

@gsmet
Copy link
Member

gsmet commented Jul 3, 2020

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Jul 3, 2020

I don't think there is much we can do about this case, but I'll have a look on Monday

@geoand
Copy link
Contributor

geoand commented Jul 8, 2020

I looked at this and there isn't anything we can do, as the dynamic test doesn't run in the ClassLoader that QuarkusTest sets up

@bertm
Copy link
Author

bertm commented Jul 10, 2020

The difference between 1.4.2 and 1.5.0 in this respect is that in 1.4.2 QuarkusTestExtension.beforeAll used to set the TCCL, and this functionality is moved to beforeEach in 1.5.0 (since 478b787 in an attempt to fix #9273).

Unfortunately beforeEach is not triggered for dynamic tests (as per JUnit documentation), so maybe this boils down to an unavoidable choice between two evils.

@khush2704
Copy link

Hello , Is this issue was ever resolved or do you have any alternative to make it work ? I am also facing similar exception -
java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule not a subtype

@gsmet
Copy link
Member

gsmet commented Mar 3, 2023

@holly-cummins @geoand maybe something we will be able to close when we update to the new JUnit with CL fixes? Thought you might have a list :).

@geoand
Copy link
Contributor

geoand commented Mar 3, 2023

Let's hope we'll be able to update.

The more I think about it, the more I think it's going to be pretty difficult....

@stilnox255
Copy link

Any news here or at least a workaround?
I use an external lib that internally calls new ObjectMapper().findAndRegisterModules(); this fails during a Test that is setup with @TestFactory.

Important part of the stack trace is:

java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
	at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1131)
	at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1115)
	at com.fasterxml.jackson.databind.ObjectMapper.findAndRegisterModules(ObjectMapper.java:1165)

@bertm
Copy link
Author

bertm commented Oct 18, 2023

I can no longer reproduce this starting from 2.1.2.Final. I suppose this was fixed with #19293.
If you still encounter this issue, consider upgrading your Quarkus or, as a quick and dirty workaround, set the TCCL in your dynamic test yourself like this:

return dynamicTest("exampleDynamicTest", () -> {
    Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
    // actual test code goes here
});

If that does not help, you are probably facing another issue.

@stilnox255
Copy link

you are right... It was another problem. Thanks for your hint!

I build up a Test like so:

return testSet.stream().map((expected) -> { 
    var result = testee.test(expected);  // <=== wrong place to run code under test
    return dynamicTest("Check", () -> { ... } );
});

this leads to running the testee in the stream()-context (URLClassLoader).

The code under test obviously has to run in the dynamicTest()-context:

return testSet.stream().map((expected) -> {
    return dynamicTest("Check", () -> {
            var result = testee.test(expected);  // <=== right place
            ...
    });
});

@geoand
Copy link
Contributor

geoand commented Sep 30, 2024

Is this still an issue?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label Sep 30, 2024
@holly-cummins
Copy link
Contributor

@geoand asks:

Is this still an issue?

@bertm said:

I can no longer reproduce this starting from 2.1.2.Final. I suppose this was fixed with #19293. If you still encounter this issue, consider upgrading your Quarkus or, as a quick and dirty workaround, set the TCCL in your dynamic test yourself like this:

I've just tried the reproducer with 3.15.1, and it still works fine. However, our DynamicTestsTestCase was introduced before this issue was raised, so I think we can assume that it doesn't cover this particular class of error, and #19293 did not add new tests. So I think we should add the tests, since I can imagine this might be an area where we see future regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants