diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java index f3ebf58184b3c..1c6f5009c660c 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java @@ -73,8 +73,10 @@ import io.quarkus.deployment.QuarkusClassWriter; import io.quarkus.deployment.dev.ClassScanResult; import io.quarkus.deployment.dev.DevModeContext; +import io.quarkus.deployment.dev.RuntimeUpdatesProcessor; import io.quarkus.deployment.util.IoUtil; import io.quarkus.dev.console.QuarkusConsole; +import io.quarkus.dev.testing.TestWatchedFiles; import io.quarkus.dev.testing.TracingHandler; /** @@ -379,6 +381,11 @@ public void reportingEntryPublished(TestIdentifier testIdentifier, ReportEntry e QuarkusConsole.INSTANCE.setOutputFilter(null); + //this has to happen before notifying the listeners + Map watched = TestWatchedFiles.retrieveWatchedFilePaths(); + if (watched != null) { + RuntimeUpdatesProcessor.INSTANCE.setWatchedFilePaths(watched, true); + } for (TestRunListener listener : listeners) { listener.runComplete(new TestRunResults(runId, classScanResult, classScanResult == null, start, System.currentTimeMillis(), toResultsMap(testState.getCurrentResults()))); diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestRunner.java index 3c057a5422295..cdbe69cf0fdd4 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestRunner.java @@ -24,8 +24,6 @@ import io.quarkus.bootstrap.app.CuratedApplication; import io.quarkus.deployment.dev.ClassScanResult; import io.quarkus.deployment.dev.DevModeContext; -import io.quarkus.deployment.dev.RuntimeUpdatesProcessor; -import io.quarkus.dev.testing.TestWatchedFiles; import io.quarkus.runtime.configuration.HyphenateEnumConverter; public class TestRunner { @@ -254,10 +252,6 @@ public void noTests(TestRunResults results) { synchronized (this) { runner = null; } - Map watched = TestWatchedFiles.retrieveWatchedFilePaths(); - if (watched != null) { - RuntimeUpdatesProcessor.INSTANCE.setWatchedFilePaths(watched, true); - } if (disabled) { return; }