Skip to content

Commit

Permalink
Merge pull request #19949 from stuartwdouglas/continuous-testing-fixes
Browse files Browse the repository at this point in the history
Fix continuous testing race
  • Loading branch information
stuartwdouglas authored Sep 7, 2021
2 parents 06f9f63 + 1885233 commit 5cc29c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -379,6 +381,11 @@ public void reportingEntryPublished(TestIdentifier testIdentifier, ReportEntry e

QuarkusConsole.INSTANCE.setOutputFilter(null);

//this has to happen before notifying the listeners
Map<String, Boolean> 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())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -254,10 +252,6 @@ public void noTests(TestRunResults results) {
synchronized (this) {
runner = null;
}
Map<String, Boolean> watched = TestWatchedFiles.retrieveWatchedFilePaths();
if (watched != null) {
RuntimeUpdatesProcessor.INSTANCE.setWatchedFilePaths(watched, true);
}
if (disabled) {
return;
}
Expand Down

0 comments on commit 5cc29c8

Please sign in to comment.