From 9a9458496afc38ec29863c6ea69f0f61fa87d631 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Mon, 7 Jun 2021 09:56:22 +1000 Subject: [PATCH] quarkus:test output does not always start Fixes #17717 --- .../java/io/quarkus/deployment/dev/console/ConsoleHelper.java | 1 + .../io/quarkus/deployment/dev/testing/TestTracingProcessor.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/console/ConsoleHelper.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/console/ConsoleHelper.java index 2458dce2896e8..0048c99784104 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/console/ConsoleHelper.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/console/ConsoleHelper.java @@ -38,6 +38,7 @@ public void accept(Connection connection) { QuarkusConsole.INSTANCE = new BasicConsole(config.disableColor, !config.disableConsoleInput, System.out); } } + QuarkusConsole.start(); RedirectPrintStream ps = new RedirectPrintStream(); System.setOut(ps); System.setErr(ps); diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestTracingProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestTracingProcessor.java index a267151241fa9..502a21101d3a0 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestTracingProcessor.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestTracingProcessor.java @@ -44,6 +44,7 @@ LogCleanupFilterBuildItem handle() { } @BuildStep(onlyIf = IsDevelopment.class) + @Produce(TestSetupBuildItem.class) void setupConsole(TestConfig config, BuildProducer testListenerBuildItemBuildProducer) { if (!TestSupport.instance().isPresent() || config.continuousTesting == TestConfig.Mode.DISABLED || config.flatClassPath) {