diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index f1c39ced2103b..5cf1616cc82f1 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -1540,13 +1540,6 @@
quarkus-vertx-http-deployment
${project.version}
-
- io.quarkus
- quarkus-vertx-http-deployment
- ${project.version}
- test-jar
- test
-
io.quarkus
quarkus-vertx-web
diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/ContinuousTestingSharedStateListener.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/ContinuousTestingSharedStateListener.java
new file mode 100644
index 0000000000000..6604230f961b2
--- /dev/null
+++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/ContinuousTestingSharedStateListener.java
@@ -0,0 +1,93 @@
+package io.quarkus.deployment.dev.testing;
+
+import java.util.function.Consumer;
+
+import io.quarkus.dev.testing.ContinuousTestingSharedStateManager;
+
+public class ContinuousTestingSharedStateListener implements TestListener {
+
+ private volatile ContinuousTestingSharedStateManager.State lastState;
+
+ @Override
+ public void listenerRegistered(TestController testController) {
+
+ }
+
+ @Override
+ public void testsEnabled() {
+ if (lastState == null) {
+ ContinuousTestingSharedStateManager
+ .setLastState(new ContinuousTestingSharedStateManager.State(
+ ContinuousTestingSharedStateManager.getLastState().lastRun, true, false,
+ 0, 0, 0, 0,
+ 0, 0, 0, ContinuousTestingSharedStateManager.getLastState().isBrokenOnly,
+ ContinuousTestingSharedStateManager.getLastState().isTestOutput,
+ ContinuousTestingSharedStateManager.getLastState().isInstrumentationBasedReload,
+ ContinuousTestingSharedStateManager.getLastState().isLiveReload));
+ } else {
+ ContinuousTestingSharedStateManager
+ .setLastState(lastState);
+ }
+ }
+
+ @Override
+ public void testsDisabled() {
+ ContinuousTestingSharedStateManager.setRunning(false);
+ }
+
+ @Override
+ public void testRunStarted(Consumer listenerConsumer) {
+ ContinuousTestingSharedStateManager.setInProgress(true);
+ listenerConsumer.accept(new TestRunListener() {
+
+ @Override
+ public void runComplete(TestRunResults testRunResults) {
+ lastState = new ContinuousTestingSharedStateManager.State(testRunResults.getId(), true, false,
+ testRunResults.getPassedCount() +
+ testRunResults.getFailedCount() +
+ testRunResults.getSkippedCount(),
+ testRunResults.getPassedCount(),
+ testRunResults.getFailedCount(), testRunResults.getSkippedCount(),
+ testRunResults.getCurrentPassedCount(), testRunResults.getCurrentFailedCount(),
+ testRunResults.getCurrentSkippedCount(),
+ ContinuousTestingSharedStateManager.getLastState().isBrokenOnly,
+ ContinuousTestingSharedStateManager.getLastState().isTestOutput,
+ ContinuousTestingSharedStateManager.getLastState().isInstrumentationBasedReload,
+ ContinuousTestingSharedStateManager.getLastState().isLiveReload);
+ ContinuousTestingSharedStateManager.setLastState(lastState);
+ }
+
+ @Override
+ public void noTests(TestRunResults results) {
+ runComplete(results);
+ }
+
+ @Override
+ public void runAborted() {
+ ContinuousTestingSharedStateManager.setInProgress(false);
+ }
+ });
+
+ }
+
+ @Override
+ public void setBrokenOnly(boolean bo) {
+ ContinuousTestingSharedStateManager.setBrokenOnly(bo);
+ }
+
+ @Override
+ public void setTestOutput(boolean to) {
+ ContinuousTestingSharedStateManager.setTestOutput(to);
+ }
+
+ @Override
+ public void setInstrumentationBasedReload(boolean ibr) {
+ ContinuousTestingSharedStateManager.setInstrumentationBasedReload(ibr);
+ }
+
+ @Override
+ public void setLiveReloadEnabled(boolean lre) {
+ ContinuousTestingSharedStateManager.setLiveReloadEnabled(lre);
+ }
+
+}
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 9da423bb4f1bd..7e2777caaa5e4 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
@@ -42,6 +42,11 @@ LogCleanupFilterBuildItem handle() {
static volatile boolean testingSetup;
+ @BuildStep
+ TestListenerBuildItem sharedStateListener() {
+ return new TestListenerBuildItem(new ContinuousTestingSharedStateListener());
+ }
+
@BuildStep(onlyIf = IsDevelopment.class)
@Produce(LogHandlerBuildItem.class)
@Produce(TestSetupBuildItem.class)
diff --git a/core/devmode-spi/src/main/java/io/quarkus/dev/testing/ContinuousTestingSharedStateManager.java b/core/devmode-spi/src/main/java/io/quarkus/dev/testing/ContinuousTestingSharedStateManager.java
new file mode 100644
index 0000000000000..cc981b36e9009
--- /dev/null
+++ b/core/devmode-spi/src/main/java/io/quarkus/dev/testing/ContinuousTestingSharedStateManager.java
@@ -0,0 +1,150 @@
+package io.quarkus.dev.testing;
+
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.function.Consumer;
+
+public class ContinuousTestingSharedStateManager {
+
+ private static final CopyOnWriteArraySet> stateListeners = new CopyOnWriteArraySet<>();
+ public static final State INITIAL_STATE = new State(-1, false, false, 0, 0, 0, 0, 0, 0, 0, false, false, false, true);
+ private static volatile State lastState = INITIAL_STATE;
+
+ public static void addStateListener(Consumer stateListener) {
+ stateListeners.add(stateListener);
+ if (lastState != null) {
+ stateListener.accept(lastState);
+ }
+ }
+
+ public static void removeStateListener(Consumer stateListener) {
+ stateListeners.remove(stateListener);
+ }
+
+ public static void reset() {
+ setLastState(INITIAL_STATE);
+ }
+
+ public static void setLastState(State state) {
+ lastState = state;
+ for (var sl : stateListeners) {
+ sl.accept(state);
+ }
+ }
+
+ public static State getLastState() {
+ return lastState;
+ }
+
+ public static void setInProgress(boolean inProgress) {
+ State state = lastState;
+ if (state != null) {
+ setLastState(
+ new State(state.lastRun, state.running, inProgress, state.run, state.passed, state.failed, state.skipped,
+ state.currentPassed, state.currentFailed, state.currentSkipped, state.isBrokenOnly,
+ state.isTestOutput, state.isInstrumentationBasedReload, state.isLiveReload));
+ }
+ }
+
+ public static void setRunning(boolean running) {
+ State state = lastState;
+ if (state != null) {
+ setLastState(new State(state.lastRun, running, running && state.inProgress, state.run, state.passed, state.failed,
+ state.skipped,
+ state.currentPassed, state.currentFailed, state.currentSkipped, state.isBrokenOnly, state.isTestOutput,
+ state.isInstrumentationBasedReload, state.isLiveReload));
+ }
+ }
+
+ public static void setBrokenOnly(boolean brokenOnly) {
+ State state = lastState;
+ if (state != null) {
+ setLastState(new State(state.lastRun, state.running, state.inProgress, state.run, state.passed, state.failed,
+ state.skipped,
+ state.currentPassed, state.currentFailed, state.currentSkipped, brokenOnly, state.isTestOutput,
+ state.isInstrumentationBasedReload, state.isLiveReload));
+ }
+ }
+
+ public static void setTestOutput(boolean testOutput) {
+ State state = lastState;
+ if (state != null) {
+ setLastState(new State(state.lastRun, state.running, state.inProgress, state.run, state.passed, state.failed,
+ state.skipped,
+ state.currentPassed, state.currentFailed, state.currentSkipped, state.isBrokenOnly, testOutput,
+ state.isInstrumentationBasedReload, state.isLiveReload));
+ }
+ }
+
+ public static void setInstrumentationBasedReload(boolean instrumentationBasedReload) {
+ State state = lastState;
+ if (state != null) {
+ setLastState(new State(state.lastRun, state.running, state.inProgress, state.run, state.passed, state.failed,
+ state.skipped,
+ state.currentPassed, state.currentFailed, state.currentSkipped, state.isBrokenOnly, state.isTestOutput,
+ instrumentationBasedReload, state.isLiveReload));
+ }
+ }
+
+ public static void setLiveReloadEnabled(boolean liveReload) {
+ State state = lastState;
+ if (state != null) {
+ setLastState(new State(state.lastRun, state.running, state.inProgress, state.run, state.passed, state.failed,
+ state.skipped,
+ state.currentPassed, state.currentFailed, state.currentSkipped, state.isBrokenOnly, state.isTestOutput,
+ state.isInstrumentationBasedReload, liveReload));
+ }
+ }
+
+ public static class State {
+ public final long lastRun;
+ public final boolean running;
+ public final boolean inProgress;
+ public final long run;
+ public final long passed;
+ public final long failed;
+ public final long skipped;
+ public final long currentPassed;
+ public final long currentFailed;
+ public final long currentSkipped;
+ public final boolean isBrokenOnly;
+ public final boolean isTestOutput;
+ public final boolean isInstrumentationBasedReload;
+ public final boolean isLiveReload;
+
+ public State(long lastRun, boolean running, boolean inProgress, long run, long passed, long failed, long skipped,
+ long currentPassed, long currentFailed, long currentSkipped, boolean isBrokenOnly, boolean isTestOutput,
+ boolean isInstrumentationBasedReload, boolean isLiveReload) {
+ this.lastRun = lastRun;
+ this.running = running;
+ this.inProgress = inProgress;
+ this.run = run;
+ this.passed = passed;
+ this.failed = failed;
+ this.skipped = skipped;
+ this.currentPassed = currentPassed;
+ this.currentFailed = currentFailed;
+ this.currentSkipped = currentSkipped;
+ this.isBrokenOnly = isBrokenOnly;
+ this.isTestOutput = isTestOutput;
+ this.isInstrumentationBasedReload = isInstrumentationBasedReload;
+ this.isLiveReload = isLiveReload;
+ }
+
+ @Override
+ public String toString() {
+ return "State{" +
+ "lastRun=" + lastRun +
+ ", running=" + running +
+ ", inProgress=" + inProgress +
+ ", run=" + run +
+ ", passed=" + passed +
+ ", failed=" + failed +
+ ", skipped=" + skipped +
+ ", isBrokenOnly=" + isBrokenOnly +
+ ", isTestOutput=" + isTestOutput +
+ ", isInstrumentationBasedReload=" + isInstrumentationBasedReload +
+ ", isLiveReload=" + isLiveReload +
+ '}';
+ }
+ }
+}
diff --git a/core/devmode-spi/src/main/java/io/quarkus/dev/testing/ContinuousTestingWebsocketListener.java b/core/devmode-spi/src/main/java/io/quarkus/dev/testing/ContinuousTestingWebsocketListener.java
deleted file mode 100644
index bc272a58a1db5..0000000000000
--- a/core/devmode-spi/src/main/java/io/quarkus/dev/testing/ContinuousTestingWebsocketListener.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package io.quarkus.dev.testing;
-
-import java.util.function.Consumer;
-
-//TODO: this is pretty horrible
-public class ContinuousTestingWebsocketListener {
-
- private static Consumer stateListener;
- private static volatile State lastState = new State(false, false, 0, 0, 0, 0, false, false, false, true);
-
- public static Consumer getStateListener() {
- return stateListener;
- }
-
- public static void setStateListener(Consumer stateListener) {
- ContinuousTestingWebsocketListener.stateListener = stateListener;
- if (lastState != null && stateListener != null) {
- stateListener.accept(lastState);
- }
- }
-
- public static void setLastState(State state) {
- lastState = state;
- Consumer sl = stateListener;
- if (sl != null) {
- sl.accept(state);
- }
- }
-
- public static State getLastState() {
- return lastState;
- }
-
- public static void setInProgress(boolean inProgress) {
- State state = lastState;
- if (state != null) {
- setLastState(new State(state.running, inProgress, state.run, state.passed, state.failed, state.skipped,
- state.isBrokenOnly, state.isTestOutput, state.isInstrumentationBasedReload, state.isLiveReload));
- }
- }
-
- public static void setRunning(boolean running) {
- State state = lastState;
- if (state != null) {
- setLastState(new State(running, running && state.inProgress, state.run, state.passed, state.failed, state.skipped,
- state.isBrokenOnly, state.isTestOutput, state.isInstrumentationBasedReload, state.isLiveReload));
- }
- }
-
- public static void setBrokenOnly(boolean brokenOnly) {
- State state = lastState;
- if (state != null) {
- setLastState(new State(state.running, state.inProgress, state.run, state.passed, state.failed, state.skipped,
- brokenOnly, state.isTestOutput, state.isInstrumentationBasedReload, state.isLiveReload));
- }
- }
-
- public static void setTestOutput(boolean testOutput) {
- State state = lastState;
- if (state != null) {
- setLastState(new State(state.running, state.inProgress, state.run, state.passed, state.failed, state.skipped,
- state.isBrokenOnly, testOutput, state.isInstrumentationBasedReload, state.isLiveReload));
- }
- }
-
- public static void setInstrumentationBasedReload(boolean instrumentationBasedReload) {
- State state = lastState;
- if (state != null) {
- setLastState(new State(state.running, state.inProgress, state.run, state.passed, state.failed, state.skipped,
- state.isBrokenOnly, state.isTestOutput, instrumentationBasedReload, state.isLiveReload));
- }
- }
-
- public static void setLiveReloadEnabled(boolean liveReload) {
- State state = lastState;
- if (state != null) {
- setLastState(new State(state.running, state.inProgress, state.run, state.passed, state.failed, state.skipped,
- state.isBrokenOnly, state.isTestOutput, state.isInstrumentationBasedReload, liveReload));
- }
- }
-
- public static class State {
- public final boolean running;
- public final boolean inProgress;
- public final long run;
- public final long passed;
- public final long failed;
- public final long skipped;
- public final boolean isBrokenOnly;
- public final boolean isTestOutput;
- public final boolean isInstrumentationBasedReload;
- public final boolean isLiveReload;
-
- public State(boolean running, boolean inProgress, long run, long passed, long failed, long skipped,
- boolean isBrokenOnly, boolean isTestOutput, boolean isInstrumentationBasedReload, boolean isLiveReload) {
- this.running = running;
- this.inProgress = inProgress;
- this.run = run;
- this.passed = passed;
- this.failed = failed;
- this.skipped = skipped;
- this.isBrokenOnly = isBrokenOnly;
- this.isTestOutput = isTestOutput;
- this.isInstrumentationBasedReload = isInstrumentationBasedReload;
- this.isLiveReload = isLiveReload;
- }
- }
-}
diff --git a/extensions/elytron-security-jdbc/deployment/pom.xml b/extensions/elytron-security-jdbc/deployment/pom.xml
index 0e71187e66be6..44c3c8f921931 100644
--- a/extensions/elytron-security-jdbc/deployment/pom.xml
+++ b/extensions/elytron-security-jdbc/deployment/pom.xml
@@ -46,12 +46,6 @@
quarkus-resteasy-deployment
test
-
- io.quarkus
- quarkus-vertx-http-deployment
- test-jar
- test
-
io.quarkus
quarkus-junit5-internal
diff --git a/extensions/elytron-security-jdbc/deployment/src/test/java/io/quarkus/elytron/security/jdbc/CustomRoleDecoderDevModeTest.java b/extensions/elytron-security-jdbc/deployment/src/test/java/io/quarkus/elytron/security/jdbc/CustomRoleDecoderDevModeTest.java
index b55a8c75daf90..772ebd49aeecf 100644
--- a/extensions/elytron-security-jdbc/deployment/src/test/java/io/quarkus/elytron/security/jdbc/CustomRoleDecoderDevModeTest.java
+++ b/extensions/elytron-security-jdbc/deployment/src/test/java/io/quarkus/elytron/security/jdbc/CustomRoleDecoderDevModeTest.java
@@ -13,9 +13,9 @@
import org.junit.jupiter.api.extension.RegisterExtension;
import io.quarkus.deployment.util.FileUtil;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.restassured.RestAssured;
//see https://github.com/quarkusio/quarkus/issues/9296
diff --git a/extensions/hibernate-orm/deployment/pom.xml b/extensions/hibernate-orm/deployment/pom.xml
index 75cea02da2efe..f1cd0a90c9730 100644
--- a/extensions/hibernate-orm/deployment/pom.xml
+++ b/extensions/hibernate-orm/deployment/pom.xml
@@ -87,12 +87,6 @@
quarkus-smallrye-metrics-deployment
test
-
- io.quarkus
- quarkus-vertx-http-deployment
- test
- test-jar
-
org.awaitility
awaitility
diff --git a/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateHotReloadTestCase.java b/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateHotReloadTestCase.java
index 64a86b95bfe2b..52c1bb4fb2f01 100644
--- a/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateHotReloadTestCase.java
+++ b/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateHotReloadTestCase.java
@@ -11,9 +11,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.restassured.RestAssured;
public class HibernateHotReloadTestCase {
diff --git a/extensions/opentelemetry/opentelemetry/deployment/pom.xml b/extensions/opentelemetry/opentelemetry/deployment/pom.xml
index c066a7c1f6503..f124d4a864618 100644
--- a/extensions/opentelemetry/opentelemetry/deployment/pom.xml
+++ b/extensions/opentelemetry/opentelemetry/deployment/pom.xml
@@ -69,12 +69,6 @@
quarkus-resteasy-deployment
test
-
- io.quarkus
- quarkus-vertx-http-deployment
- test
- test-jar
-
io.quarkus
quarkus-smallrye-health-deployment
diff --git a/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java b/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java
index 8f213de335f5c..8345afa9615b9 100644
--- a/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java
+++ b/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java
@@ -7,9 +7,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
public class OpenTelemetryContinuousTestingTest {
@RegisterExtension
diff --git a/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java b/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java
index 801673acdb872..b7dc348682d11 100644
--- a/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java
+++ b/extensions/opentelemetry/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java
@@ -8,8 +8,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.restassured.RestAssured;
public class OpenTelemetryDevModeTest {
diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml b/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml
index bcde6e700bec7..8d8bff7aceca6 100644
--- a/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml
+++ b/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml
@@ -83,12 +83,6 @@
awaitility
test
-
- io.quarkus
- quarkus-vertx-http-deployment
- test-jar
- test
-
diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingTestCase.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingTestCase.java
index e4a232da8146b..8387a6674986f 100644
--- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingTestCase.java
+++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingTestCase.java
@@ -9,8 +9,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
public class KafkaDevServicesContinuousTestingTestCase {
diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.java
index e4fdcca5abe1a..57c98b27fdf75 100644
--- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.java
+++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/testing/KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.java
@@ -9,8 +9,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
public class KafkaDevServicesContinuousTestingWorkingAppPropsTestCase {
diff --git a/extensions/vertx-http/deployment/pom.xml b/extensions/vertx-http/deployment/pom.xml
index daa32430e8a05..ed795df314e55 100644
--- a/extensions/vertx-http/deployment/pom.xml
+++ b/extensions/vertx-http/deployment/pom.xml
@@ -119,17 +119,6 @@
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
-
- test-jar
-
-
-
-
maven-compiler-plugin
diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/ContinuousTestingWebSocketTestListener.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/ContinuousTestingWebSocketTestListener.java
deleted file mode 100644
index 2d83492a8186b..0000000000000
--- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/ContinuousTestingWebSocketTestListener.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package io.quarkus.vertx.http.deployment.devmode.console;
-
-import java.util.function.Consumer;
-
-import org.junit.platform.launcher.TestIdentifier;
-
-import io.quarkus.deployment.dev.testing.TestController;
-import io.quarkus.deployment.dev.testing.TestListener;
-import io.quarkus.deployment.dev.testing.TestResult;
-import io.quarkus.deployment.dev.testing.TestRunListener;
-import io.quarkus.deployment.dev.testing.TestRunResults;
-import io.quarkus.dev.testing.ContinuousTestingWebsocketListener;
-
-public class ContinuousTestingWebSocketTestListener implements TestListener {
-
- private volatile ContinuousTestingWebsocketListener.State lastState;
-
- @Override
- public void listenerRegistered(TestController testController) {
-
- }
-
- @Override
- public void testsEnabled() {
- if (lastState == null) {
- ContinuousTestingWebsocketListener
- .setLastState(new ContinuousTestingWebsocketListener.State(true, false,
- 0, 0, 0, 0,
- ContinuousTestingWebsocketListener.getLastState().isBrokenOnly,
- ContinuousTestingWebsocketListener.getLastState().isTestOutput,
- ContinuousTestingWebsocketListener.getLastState().isInstrumentationBasedReload,
- ContinuousTestingWebsocketListener.getLastState().isLiveReload));
- } else {
- ContinuousTestingWebsocketListener
- .setLastState(lastState);
- }
- }
-
- @Override
- public void testsDisabled() {
- ContinuousTestingWebsocketListener.setRunning(false);
- }
-
- @Override
- public void testRunStarted(Consumer listenerConsumer) {
- ContinuousTestingWebsocketListener.setInProgress(true);
- listenerConsumer.accept(new TestRunListener() {
- @Override
- public void runStarted(long toRun) {
-
- }
-
- @Override
- public void testComplete(TestResult result) {
-
- }
-
- @Override
- public void runComplete(TestRunResults testRunResults) {
- lastState = new ContinuousTestingWebsocketListener.State(true, false,
- testRunResults.getPassedCount() +
- testRunResults.getFailedCount() +
- testRunResults.getSkippedCount(),
- testRunResults.getPassedCount(),
- testRunResults.getFailedCount(), testRunResults.getSkippedCount(),
- ContinuousTestingWebsocketListener.getLastState().isBrokenOnly,
- ContinuousTestingWebsocketListener.getLastState().isTestOutput,
- ContinuousTestingWebsocketListener.getLastState().isInstrumentationBasedReload,
- ContinuousTestingWebsocketListener.getLastState().isLiveReload);
- ContinuousTestingWebsocketListener.setLastState(
- lastState);
- }
-
- @Override
- public void runAborted() {
- ContinuousTestingWebsocketListener.setInProgress(false);
- }
-
- @Override
- public void testStarted(TestIdentifier testIdentifier, String className) {
-
- }
- });
-
- }
-
- @Override
- public void setBrokenOnly(boolean bo) {
- ContinuousTestingWebsocketListener.setBrokenOnly(bo);
- }
-
- @Override
- public void setTestOutput(boolean to) {
- ContinuousTestingWebsocketListener.setTestOutput(to);
- }
-
- @Override
- public void setInstrumentationBasedReload(boolean ibr) {
- ContinuousTestingWebsocketListener.setInstrumentationBasedReload(ibr);
- }
-
- @Override
- public void setLiveReloadEnabled(boolean lre) {
- ContinuousTestingWebsocketListener.setLiveReloadEnabled(lre);
- }
-
-}
diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/tests/TestsProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/tests/TestsProcessor.java
index 6bc93507d3b80..8b58de97ce3ff 100644
--- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/tests/TestsProcessor.java
+++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/tests/TestsProcessor.java
@@ -23,7 +23,6 @@
import io.quarkus.devconsole.spi.DevConsoleTemplateInfoBuildItem;
import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem;
import io.quarkus.vertx.http.deployment.RouteBuildItem;
-import io.quarkus.vertx.http.deployment.devmode.console.ContinuousTestingWebSocketTestListener;
import io.quarkus.vertx.http.runtime.devmode.DevConsoleRecorder;
import io.quarkus.vertx.http.runtime.devmode.Json;
import io.vertx.core.Handler;
@@ -61,7 +60,6 @@ public void setupTestRoutes(
.route("dev/test")
.handler(recorder.continousTestHandler(shutdownContextBuildItem))
.build());
- testListenerBuildItemBuildProducer.produce(new TestListenerBuildItem(new ContinuousTestingWebSocketTestListener()));
}
}
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/ContinuousTestingTestUtils.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/ContinuousTestingTestUtils.java
deleted file mode 100644
index 5ae3209c3dfff..0000000000000
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/ContinuousTestingTestUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package io.quarkus.vertx.http.testrunner;
-
-import java.util.Arrays;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-
-import org.awaitility.Awaitility;
-import org.awaitility.core.ConditionTimeoutException;
-
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.restassured.RestAssured;
-
-/**
- * Utilities for testing the test runner itself
- */
-public class ContinuousTestingTestUtils {
-
- long runtToWaitFor = 1;
-
- public TestStatus waitForNextCompletion() {
- try {
- Awaitility.waitAtMost(1, TimeUnit.MINUTES).pollInterval(50, TimeUnit.MILLISECONDS).until(new Callable() {
- @Override
- public Boolean call() throws Exception {
- TestStatus ts = RestAssured.get("q/dev/io.quarkus.quarkus-vertx-http/tests/status").as(TestStatus.class);
- if (ts.getLastRun() > runtToWaitFor) {
- throw new RuntimeException(
- "Waiting for run " + runtToWaitFor + " but run " + ts.getLastRun() + " has already occurred");
- }
- boolean runComplete = ts.getLastRun() == runtToWaitFor;
- if (runComplete && ts.getRunning() > 0) {
- //there is a small chance of a race, where changes are picked up twice, due to how filesystems work
- //this works around it by waiting for the next run
- runtToWaitFor = ts.getRunning();
- return false;
- } else if (runComplete) {
- runtToWaitFor++;
- }
- return runComplete;
- }
- });
- } catch (Exception e) {
- TestStatus ts = RestAssured.get("q/dev/io.quarkus.quarkus-vertx-http/tests/status").as(TestStatus.class);
- throw new ConditionTimeoutException("Failed to wait for test run" + runtToWaitFor + " " + ts);
- }
- return RestAssured.get("q/dev/io.quarkus.quarkus-vertx-http/tests/status").as(TestStatus.class);
- }
-
- public static String appProperties(String... props) {
- return "quarkus.test.continuous-testing=enabled\nquarkus.test.display-test-output=true\nquarkus.test.basic-console=true\nquarkus.test.disable-console-input=true\n"
- + String.join("\n", Arrays.asList(props));
- }
-}
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/QuarkusTestTypeTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/QuarkusTestTypeTestCase.java
index 344e0412ba79b..b1fe0916dc585 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/QuarkusTestTypeTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/QuarkusTestTypeTestCase.java
@@ -9,8 +9,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
public class QuarkusTestTypeTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestChangeTrackingWhenStartFailsTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestChangeTrackingWhenStartFailsTestCase.java
index fd7735b789b0b..bb9228f8a6c94 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestChangeTrackingWhenStartFailsTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestChangeTrackingWhenStartFailsTestCase.java
@@ -10,8 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
public class TestChangeTrackingWhenStartFailsTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestFailingBeforeAllTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestFailingBeforeAllTestCase.java
index f5c74a428b92a..ce3e1e9f0423b 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestFailingBeforeAllTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestFailingBeforeAllTestCase.java
@@ -9,8 +9,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
public class TestFailingBeforeAllTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestRunnerSmokeTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestRunnerSmokeTestCase.java
index 423c9fe8fceb0..f09ec12148800 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestRunnerSmokeTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/TestRunnerSmokeTestCase.java
@@ -10,10 +10,11 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
import io.quarkus.vertx.http.deployment.devmode.tests.ClassResult;
import io.quarkus.vertx.http.deployment.devmode.tests.SuiteResult;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
import io.restassured.RestAssured;
public class TestRunnerSmokeTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/UnitTestTypeTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/UnitTestTypeTestCase.java
index bf2d3946d51f7..db944cd60ccaa 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/UnitTestTypeTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/UnitTestTypeTestCase.java
@@ -9,8 +9,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
public class UnitTestTypeTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/brokenonly/TestBrokenOnlyTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/brokenonly/TestBrokenOnlyTestCase.java
index e6e48c30f2544..411a751b0a6e6 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/brokenonly/TestBrokenOnlyTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/brokenonly/TestBrokenOnlyTestCase.java
@@ -10,9 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.restassured.RestAssured;
public class TestBrokenOnlyTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/ExcludePatternTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/ExcludePatternTestCase.java
index cb9aa737d133e..aa5b9f6d03328 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/ExcludePatternTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/ExcludePatternTestCase.java
@@ -10,9 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.quarkus.vertx.http.testrunner.HelloResource;
public class ExcludePatternTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/IncludePatternTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/IncludePatternTestCase.java
index 715800e8597a8..69bcf14d1e857 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/IncludePatternTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/includes/IncludePatternTestCase.java
@@ -10,9 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.quarkus.vertx.http.testrunner.HelloResource;
public class IncludePatternTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/params/TestParameterizedTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/params/TestParameterizedTestCase.java
index f90ef041fdbd4..57c14bc6694f1 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/params/TestParameterizedTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/params/TestParameterizedTestCase.java
@@ -10,9 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
public class TestParameterizedTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/ExcludeTagsTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/ExcludeTagsTestCase.java
index b263e5890688f..f3bdea49bd1ae 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/ExcludeTagsTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/ExcludeTagsTestCase.java
@@ -10,9 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.quarkus.vertx.http.testrunner.HelloResource;
public class ExcludeTagsTestCase {
diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/IncludeTagsTestCase.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/IncludeTagsTestCase.java
index 15b12b553e496..8d136c596def6 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/IncludeTagsTestCase.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/testrunner/tags/IncludeTagsTestCase.java
@@ -10,9 +10,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import io.quarkus.test.ContinuousTestingTestUtils;
+import io.quarkus.test.ContinuousTestingTestUtils.TestStatus;
import io.quarkus.test.QuarkusDevModeTest;
-import io.quarkus.vertx.http.deployment.devmode.tests.TestStatus;
-import io.quarkus.vertx.http.testrunner.ContinuousTestingTestUtils;
import io.quarkus.vertx.http.testrunner.HelloResource;
public class IncludeTagsTestCase {
diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/ContinuousTestWebSocketHandler.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/ContinuousTestWebSocketHandler.java
index 683ddf8eafc93..34f37b59bf3f6 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/ContinuousTestWebSocketHandler.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/ContinuousTestWebSocketHandler.java
@@ -8,21 +8,21 @@
import org.jboss.logging.Logger;
import io.netty.handler.codec.http.HttpHeaderNames;
-import io.quarkus.dev.testing.ContinuousTestingWebsocketListener;
+import io.quarkus.dev.testing.ContinuousTestingSharedStateManager;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.http.ServerWebSocket;
import io.vertx.ext.web.RoutingContext;
public class ContinuousTestWebSocketHandler
- implements Handler, Consumer {
+ implements Handler, Consumer {
- private static final Logger log = Logger.getLogger(ContinuousTestingWebsocketListener.class);
+ private static final Logger log = Logger.getLogger(ContinuousTestingSharedStateManager.class);
private static final Set sockets = Collections.newSetFromMap(new ConcurrentHashMap<>());
private static volatile String lastMessage;
@Override
- public void accept(ContinuousTestingWebsocketListener.State state) {
+ public void accept(ContinuousTestingSharedStateManager.State state) {
Json.JsonObjectBuilder response = Json.object();
response.put("running", state.running);
response.put("inProgress", state.inProgress);
diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/DevConsoleRecorder.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/DevConsoleRecorder.java
index ec5126f6b5909..8b2e5cb4ee755 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/DevConsoleRecorder.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/DevConsoleRecorder.java
@@ -15,7 +15,7 @@
import org.jboss.logging.Logger;
import io.quarkus.dev.console.DevConsoleManager;
-import io.quarkus.dev.testing.ContinuousTestingWebsocketListener;
+import io.quarkus.dev.testing.ContinuousTestingSharedStateManager;
import io.quarkus.runtime.ShutdownContext;
import io.quarkus.runtime.annotations.Recorder;
import io.vertx.core.Handler;
@@ -48,11 +48,12 @@ public Handler devConsoleHandler(String devConsoleFinalDestinati
public Handler continousTestHandler(ShutdownContext context) {
ContinuousTestWebSocketHandler handler = new ContinuousTestWebSocketHandler();
- ContinuousTestingWebsocketListener.setStateListener(handler);
+ ContinuousTestingSharedStateManager.addStateListener(handler);
context.addShutdownTask(new Runnable() {
@Override
public void run() {
- ContinuousTestingWebsocketListener.setStateListener(null);
+ ContinuousTestingSharedStateManager.removeStateListener(handler);
+ ContinuousTestingSharedStateManager.reset();
}
});
diff --git a/test-framework/junit5-internal/pom.xml b/test-framework/junit5-internal/pom.xml
index 85c157b718a99..5e3194031627f 100644
--- a/test-framework/junit5-internal/pom.xml
+++ b/test-framework/junit5-internal/pom.xml
@@ -55,6 +55,10 @@
io.quarkus
quarkus-devtools-utilities
+
+ org.awaitility
+ awaitility
+
diff --git a/test-framework/junit5-internal/src/main/java/io/quarkus/test/ContinuousTestingTestUtils.java b/test-framework/junit5-internal/src/main/java/io/quarkus/test/ContinuousTestingTestUtils.java
new file mode 100644
index 0000000000000..3fa5c1c3389e8
--- /dev/null
+++ b/test-framework/junit5-internal/src/main/java/io/quarkus/test/ContinuousTestingTestUtils.java
@@ -0,0 +1,185 @@
+package io.quarkus.test;
+
+import java.util.Arrays;
+import java.util.concurrent.Callable;
+import java.util.concurrent.TimeUnit;
+
+import org.awaitility.Awaitility;
+import org.awaitility.core.ConditionTimeoutException;
+
+import io.quarkus.dev.testing.ContinuousTestingSharedStateManager;
+
+/**
+ * Utilities for testing the test runner itself
+ */
+public class ContinuousTestingTestUtils {
+
+ long runToWaitFor = 1;
+
+ public TestStatus waitForNextCompletion() {
+ try {
+ Awaitility.waitAtMost(1, TimeUnit.MINUTES).pollInterval(50, TimeUnit.MILLISECONDS).until(new Callable() {
+ @Override
+ public Boolean call() throws Exception {
+ ContinuousTestingSharedStateManager.State ts = ContinuousTestingSharedStateManager.getLastState();
+ if (ts.lastRun > runToWaitFor) {
+ throw new RuntimeException(
+ "Waiting for run " + runToWaitFor + " but run " + ts.lastRun + " has already occurred");
+ }
+ boolean runComplete = ts.lastRun == runToWaitFor;
+ if (runComplete && ts.inProgress) {
+ //there is a small chance of a race, where changes are picked up twice, due to how filesystems work
+ //this works around it by waiting for the next run
+ runToWaitFor = ts.lastRun;
+ return false;
+ } else if (runComplete) {
+ runToWaitFor++;
+ }
+ return runComplete;
+ }
+ });
+ } catch (Exception e) {
+ ContinuousTestingSharedStateManager.State ts = ContinuousTestingSharedStateManager.getLastState();
+ throw new ConditionTimeoutException("Failed to wait for test run " + runToWaitFor + " " + ts);
+ }
+ var s = ContinuousTestingSharedStateManager.getLastState();
+ return new TestStatus(s.lastRun, s.running ? s.lastRun + 1 : -1, s.run, s.currentPassed, s.currentFailed,
+ s.currentSkipped, s.passed, s.failed, s.skipped);
+ }
+
+ public static String appProperties(String... props) {
+ return "quarkus.test.continuous-testing=enabled\nquarkus.test.display-test-output=true\nquarkus.test.basic-console=true\nquarkus.test.disable-console-input=true\n"
+ + String.join("\n", Arrays.asList(props));
+ }
+
+ public static class TestStatus {
+
+ private long lastRun;
+
+ private long running;
+
+ private long testsRun = -1;
+
+ private long testsPassed = -1;
+
+ private long testsFailed = -1;
+
+ private long testsSkipped = -1;
+
+ private long totalTestsPassed = -1;
+
+ private long totalTestsFailed = -1;
+
+ private long totalTestsSkipped = -1;
+
+ public TestStatus() {
+ }
+
+ public TestStatus(long lastRun, long running, long testsRun, long testsPassed, long testsFailed, long testsSkipped,
+ long totalTestsPassed, long totalTestsFailed, long totalTestsSkipped) {
+ this.lastRun = lastRun;
+ this.running = running;
+ this.testsRun = testsRun;
+ this.testsPassed = testsPassed;
+ this.testsFailed = testsFailed;
+ this.testsSkipped = testsSkipped;
+ this.totalTestsPassed = totalTestsPassed;
+ this.totalTestsFailed = totalTestsFailed;
+ this.totalTestsSkipped = totalTestsSkipped;
+
+ }
+
+ public long getLastRun() {
+ return lastRun;
+ }
+
+ public TestStatus setLastRun(long lastRun) {
+ this.lastRun = lastRun;
+ return this;
+ }
+
+ public long getRunning() {
+ return running;
+ }
+
+ public TestStatus setRunning(long running) {
+ this.running = running;
+ return this;
+ }
+
+ public long getTestsRun() {
+ return testsRun;
+ }
+
+ public TestStatus setTestsRun(long testsRun) {
+ this.testsRun = testsRun;
+ return this;
+ }
+
+ public long getTestsPassed() {
+ return testsPassed;
+ }
+
+ public TestStatus setTestsPassed(long testsPassed) {
+ this.testsPassed = testsPassed;
+ return this;
+ }
+
+ public long getTestsFailed() {
+ return testsFailed;
+ }
+
+ public TestStatus setTestsFailed(long testsFailed) {
+ this.testsFailed = testsFailed;
+ return this;
+ }
+
+ public long getTestsSkipped() {
+ return testsSkipped;
+ }
+
+ public TestStatus setTestsSkipped(long testsSkipped) {
+ this.testsSkipped = testsSkipped;
+ return this;
+ }
+
+ public long getTotalTestsPassed() {
+ return totalTestsPassed;
+ }
+
+ public TestStatus setTotalTestsPassed(long totalTestsPassed) {
+ this.totalTestsPassed = totalTestsPassed;
+ return this;
+ }
+
+ public long getTotalTestsFailed() {
+ return totalTestsFailed;
+ }
+
+ public TestStatus setTotalTestsFailed(long totalTestsFailed) {
+ this.totalTestsFailed = totalTestsFailed;
+ return this;
+ }
+
+ public long getTotalTestsSkipped() {
+ return totalTestsSkipped;
+ }
+
+ public TestStatus setTotalTestsSkipped(long totalTestsSkipped) {
+ this.totalTestsSkipped = totalTestsSkipped;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return "TestStatus{" +
+ "lastRun=" + lastRun +
+ ", running=" + running +
+ ", testsRun=" + testsRun +
+ ", testsPassed=" + testsPassed +
+ ", testsFailed=" + testsFailed +
+ ", testsSkipped=" + testsSkipped +
+ '}';
+ }
+ }
+}