Open
Description
openedon Aug 2, 2024
Description
Ideally, Quarkus integration tests should be able to run concurrently in JUnit 5 by configuring:
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
Doing this currently results in some sort race condition.
(in my limited testing this occurs about ~50% of the time, the rest of the time, my tests pass successfully.)
java.lang.RuntimeException: java.lang.IllegalStateException: SRCFG00017: Configuration already registered for the given class loader
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.throwBootFailureException(QuarkusIntegrationTestExtension.java:373)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.beforeEach(QuarkusIntegrationTestExtension.java:117)
at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Caused by: java.lang.IllegalStateException: SRCFG00017: Configuration already registered for the given class loader
at io.smallrye.config.SmallRyeConfigProviderResolver.registerConfig(SmallRyeConfigProviderResolver.java:120)
at io.quarkus.runtime.configuration.QuarkusConfigFactory.setConfig(QuarkusConfigFactory.java:48)
at io.quarkus.test.common.LauncherUtil.installAndGetSomeConfig(LauncherUtil.java:42)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.lambda$isCallbacksEnabledForIntegrationTests$1(QuarkusIntegrationTestExtension.java:381)
at java.base/java.util.Optional.or(Optional.java:313)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.isCallbacksEnabledForIntegrationTests(QuarkusIntegrationTestExtension.java:381)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.doProcessStart(QuarkusIntegrationTestExtension.java:225)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.ensureStarted(QuarkusIntegrationTestExtension.java:169)
at io.quarkus.test.junit.QuarkusIntegrationTestExtension.beforeAll(QuarkusIntegrationTestExtension.java:130)
... 6 more
Implementation ideas
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment