diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java index 75b0354f45281..e7e91c2ea74a5 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java @@ -30,6 +30,7 @@ import org.junit.jupiter.api.extension.TestInstancePostProcessor; import org.opentest4j.TestAbortedException; +import io.quarkus.bootstrap.logging.InitialConfigurator; import io.quarkus.runtime.test.TestHttpEndpointProvider; import io.quarkus.test.common.ArtifactLauncher; import io.quarkus.test.common.DevServicesContext; @@ -205,6 +206,9 @@ public void close() throws Throwable { return state; } catch (Throwable e) { + if (!InitialConfigurator.DELAYED_HANDLER.isActivated()) { + activateLogging(); + } try { if (testResourceManager != null) { diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusMainTestExtension.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusMainTestExtension.java index ad00572d585da..3e72aa8a89600 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusMainTestExtension.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusMainTestExtension.java @@ -1,5 +1,6 @@ package io.quarkus.test.junit; +import static io.quarkus.test.junit.IntegrationTestUtil.activateLogging; import static io.quarkus.test.junit.IntegrationTestUtil.getAdditionalTestResources; import java.io.Closeable; @@ -21,6 +22,7 @@ import org.junit.jupiter.api.extension.ParameterResolver; import io.quarkus.bootstrap.app.StartupAction; +import io.quarkus.bootstrap.logging.InitialConfigurator; import io.quarkus.deployment.dev.testing.LogCapturingOutputFilter; import io.quarkus.dev.console.QuarkusConsole; import io.quarkus.dev.testing.TracingHandler; @@ -36,8 +38,6 @@ public class QuarkusMainTestExtension extends AbstractJvmQuarkusTestExtension public static final ExtensionContext.Namespace NAMESPACE = ExtensionContext.Namespace .create("io.quarkus.test.main.jvm"); - private static Map devServicesProps; - PrepareResult prepareResult; private static boolean hasPerTestResources; @@ -159,6 +159,9 @@ private int doJavaStart(ExtensionContext context, Class