From 32d011ed655b38ddf9bb5ed36e7a36632838e42f Mon Sep 17 00:00:00 2001 From: Holly Cummins Date: Wed, 22 May 2024 17:56:11 +0100 Subject: [PATCH] Update matcher to catch single test case --- .../src/main/java/io/quarkus/test/ProdModeTestBuildStep.java | 2 +- .../TestModeContinuousTestingMavenTestUtils.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test-framework/junit5-internal/src/main/java/io/quarkus/test/ProdModeTestBuildStep.java b/test-framework/junit5-internal/src/main/java/io/quarkus/test/ProdModeTestBuildStep.java index 53e649fad5126..f87c76b549161 100644 --- a/test-framework/junit5-internal/src/main/java/io/quarkus/test/ProdModeTestBuildStep.java +++ b/test-framework/junit5-internal/src/main/java/io/quarkus/test/ProdModeTestBuildStep.java @@ -4,7 +4,7 @@ import io.quarkus.builder.BuildStep; -// needs to be in a class of it's own in order to avoid java.lang.IncompatibleClassChangeError +// needs to be in a class of its own in order to avoid java.lang.IncompatibleClassChangeError public abstract class ProdModeTestBuildStep implements BuildStep { private final Map testContext; diff --git a/test-framework/maven/src/main/java/io/quarkus/maven/it/continuoustesting/TestModeContinuousTestingMavenTestUtils.java b/test-framework/maven/src/main/java/io/quarkus/maven/it/continuoustesting/TestModeContinuousTestingMavenTestUtils.java index 15b4530ea586b..d08e2c7cf7b1d 100644 --- a/test-framework/maven/src/main/java/io/quarkus/maven/it/continuoustesting/TestModeContinuousTestingMavenTestUtils.java +++ b/test-framework/maven/src/main/java/io/quarkus/maven/it/continuoustesting/TestModeContinuousTestingMavenTestUtils.java @@ -22,10 +22,11 @@ public class TestModeContinuousTestingMavenTestUtils extends ContinuousTestingMa // Example output we look for // 1 test failed (1 passing, 0 skipped), 1 test was run in 217ms. Tests completed at 21:22:34 due to changes to HelloResource$Blah.class and 1 other files. // All 2 tests are passing (0 skipped), 2 tests were run in 1413ms. Tests completed at 21:22:33. + // All 1 test is passing (0 skipped), ... // Windows log, despite `quarkus.console.basic=true', might contain terminal control symbols, colour decorations. // e.g. the matcher is then fighting: 1 test failed (1 passing, 0 skipped) private static final Pattern ALL_PASSING = Pattern.compile( - "(?:\\e\\[[\\d;]+m)*All (\\d+) tests are passing \\((\\d+) skipped\\)", + "(?:\\e\\[[\\d;]+m)*All (\\d+) tests? (?:are|is) passing \\((\\d+) skipped\\)", Pattern.MULTILINE); private static final Pattern SOME_PASSING = Pattern .compile(