From b2ac35d063e89aa6772c1d76444b9c02b9bbc2a3 Mon Sep 17 00:00:00 2001 From: Holly Cummins Date: Fri, 2 May 2025 18:03:46 +0100 Subject: [PATCH] Add cautions about newly discovered regressions --- _posts/2025-04-30-test-classloading-rewrite.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_posts/2025-04-30-test-classloading-rewrite.adoc b/_posts/2025-04-30-test-classloading-rewrite.adoc index 32cfc8305f..72d173d545 100644 --- a/_posts/2025-04-30-test-classloading-rewrite.adoc +++ b/_posts/2025-04-30-test-classloading-rewrite.adoc @@ -42,8 +42,10 @@ In practice, there have been a few hiccups and we've also discovered some edge c === Known regressions -- *Dev services now start in the JUnit discovery phase*. https://quarkus.io/guides/dev-services[Quarkus Dev Services] are currently started during https://quarkus.io/guides/reaugmentation#what-is-augmentation[the augmentation phase], along with bytecode manipulation and other application initialization steps. With the new testing design, all augmentation happens at the beginning of the test run, during the JUnit discovery phase. This means all Dev Services also start at the beginning of the test run. If several test classes with different Dev Service configuration are augmented before any tests are run, multiple differently-configured Dev Services may be running at the same time. This can cause port conflicts and cross-talk on configuration values. We're hoping to have a https://github.com/quarkusio/quarkus/issues/45785[fix] for this in the next release. As a workaround, splitting conflicting tests into separate projects should fix symptoms. +- *All dev services now start in the JUnit discovery phase*. https://quarkus.io/guides/dev-services[Quarkus Dev Services] are currently started during https://quarkus.io/guides/reaugmentation#what-is-augmentation[the augmentation phase], along with bytecode manipulation and other application initialization steps. With the new testing design, all augmentation happens at the beginning of the test run, during the JUnit discovery phase. This means all Dev Services also start at the beginning of the test run. If several test classes with different Dev Service configuration are augmented before any tests are run, multiple differently-configured Dev Services may be running at the same time. This can cause port conflicts and cross-talk on configuration values. We're hoping to have a https://github.com/quarkusio/quarkus/issues/45785[fix] for this in the next release. As a workaround, splitting conflicting tests into separate projects should fix symptoms. - *Config access from JUnit conditions*. Using a `ConfigProvider` from a custom JUnit condition will https://github.com/quarkusio/quarkus/issues/47081[trigger a `ServiceConfigurationError`]. The workaround is to set the thread context classloader to `this.getClass().getClassLoader()` before reading config, and then set it back afterwards. +- *Nested test issues*. If nested `@QuarkusTest` tests are mixed in the same project with plain tests, the plain tests https://github.com/quarkusio/quarkus/issues/47657[will not be able to access Quarkus config], because the thread context classloader does not get correctly reset. As a workaround, you can manually set the thread context classloader to the system classloader in the plain tests. The nested tests also https://github.com/quarkusio/quarkus/issues/47671[have problems in dev mode]. +- *junit-platform.properties* Including a `junit-platform.properties` in a Gradle project https://github.com/quarkusio/quarkus/issues/47646[causes problems] for `@QuarkusTest`s. - *Eclipse support*. Running `QuarkusTest` tests from the Eclipse IDE is https://github.com/quarkusio/quarkus/issues/47656[more challenging]. Right-clicking and running individual test methods works, and running a whole package also works. But running at the class level gives an error. - *Increased memory footprint running tests.* For suites using multiple profiles and resources, more heap or metaspace may be needed.