diff --git a/integration-tests/kogito-maven/src/test/java/io/quarkus/kogito/maven/it/KogitoDevModeIT.java b/integration-tests/kogito-maven/src/test/java/io/quarkus/kogito/maven/it/KogitoDevModeIT.java index cccdbea02..a6e86dda4 100644 --- a/integration-tests/kogito-maven/src/test/java/io/quarkus/kogito/maven/it/KogitoDevModeIT.java +++ b/integration-tests/kogito-maven/src/test/java/io/quarkus/kogito/maven/it/KogitoDevModeIT.java @@ -15,7 +15,7 @@ public class KogitoDevModeIT extends RunAndCheckMojoTestBase { @Test public void testThatTheKogitoApplicationRuns() throws MavenInvocationException, IOException { testDir = getTargetDir("projects/simple-kogito"); - run("-e"); + run(false, "-e"); await() .pollDelay(1, TimeUnit.SECONDS) diff --git a/integration-tests/kotlin/src/test/java/io/quarkus/kotlin/maven/it/KotlinDevModeIT.java b/integration-tests/kotlin/src/test/java/io/quarkus/kotlin/maven/it/KotlinDevModeIT.java index e59952b84..db619cffd 100644 --- a/integration-tests/kotlin/src/test/java/io/quarkus/kotlin/maven/it/KotlinDevModeIT.java +++ b/integration-tests/kotlin/src/test/java/io/quarkus/kotlin/maven/it/KotlinDevModeIT.java @@ -19,7 +19,7 @@ public class KotlinDevModeIT extends RunAndCheckMojoTestBase { @Test public void testThatTheApplicationIsReloadedOnKotlinChange() throws MavenInvocationException, IOException { testDir = initProject("projects/classic-kotlin", "projects/project-classic-run-kotlin-change"); - runAndCheck(); + runAndCheck(false); // Edit the "Hello" message. File jaxRsResource = new File(testDir, "src/main/kotlin/org/acme/HelloResource.kt"); diff --git a/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java b/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java index 4d62c7480..8fe92d1e6 100644 --- a/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java +++ b/integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java @@ -53,7 +53,7 @@ public class DevMojoIT extends RunAndCheckMojoTestBase { @Test public void testThatResteasyWithoutUndertowCanRun() throws MavenInvocationException, IOException { testDir = initProject("projects/classic-no-undertow", "projects/project-classic-no-undertow-run"); - run(); + run(false); //make sure that a simple HTTP GET request always works IntStream.range(0, 10).forEach(i -> { @@ -286,7 +286,7 @@ public class DevMojoIT extends RunAndCheckMojoTestBase { @Test public void testSourceModificationBeforeFirstCallWorks() throws MavenInvocationException, IOException { testDir = initProject("projects/classic", "projects/project-classic-source-modification-before-first-call"); - run(); + run(true); File source = new File(testDir, "src/main/java/org/acme/HelloResource.java"); // Edit the "Hello" message and provide a random string. @@ -384,7 +384,7 @@ public class DevMojoIT extends RunAndCheckMojoTestBase { .pollInterval(1, TimeUnit.SECONDS) .until(configurationFile::isFile); - run(); + run(true); // Wait until we get "uuid" await() diff --git a/test-framework/maven/src/main/java/io/quarkus/maven/it/RunAndCheckMojoTestBase.java b/test-framework/maven/src/main/java/io/quarkus/maven/it/RunAndCheckMojoTestBase.java index ff24b3153..7f46bd794 100644 --- a/test-framework/maven/src/main/java/io/quarkus/maven/it/RunAndCheckMojoTestBase.java +++ b/test-framework/maven/src/main/java/io/quarkus/maven/it/RunAndCheckMojoTestBase.java @@ -29,11 +29,13 @@ public class RunAndCheckMojoTestBase extends MojoTestBase { awaitUntilServerDown(); } - protected void run(String... options) throws FileNotFoundException, MavenInvocationException { + protected void run(boolean performCompile, String... options) throws FileNotFoundException, MavenInvocationException { assertThat(testDir).isDirectory(); running = new RunningInvoker(testDir, false); final List args = new ArrayList<>(2 + options.length); - args.add("compile"); + if (performCompile) { + args.add("compile"); + } args.add("quarkus:dev"); boolean hasDebugOptions = false; for (String option : options) { @@ -56,7 +58,12 @@ public class RunAndCheckMojoTestBase extends MojoTestBase { } protected void runAndCheck(String... options) throws FileNotFoundException, MavenInvocationException { - run(options); + runAndCheck(true, options); + } + + protected void runAndCheck(boolean performCompile, String... options) + throws FileNotFoundException, MavenInvocationException { + run(performCompile, options); String resp = getHttpResponse();