diff --git a/test-framework/common/src/main/java/io/quarkus/test/common/DefaultJarLauncher.java b/test-framework/common/src/main/java/io/quarkus/test/common/DefaultJarLauncher.java index 10958e167ad833..c2bc57724a5d23 100644 --- a/test-framework/common/src/main/java/io/quarkus/test/common/DefaultJarLauncher.java +++ b/test-framework/common/src/main/java/io/quarkus/test/common/DefaultJarLauncher.java @@ -165,6 +165,6 @@ public void includeAsSysProps(Map systemProps) { @Override public void close() { - quarkusProcess.destroy(); + LauncherUtil.destroyProcess(quarkusProcess); } } diff --git a/test-framework/common/src/main/java/io/quarkus/test/common/DefaultNativeImageLauncher.java b/test-framework/common/src/main/java/io/quarkus/test/common/DefaultNativeImageLauncher.java index e61359e020238b..33345980da115a 100644 --- a/test-framework/common/src/main/java/io/quarkus/test/common/DefaultNativeImageLauncher.java +++ b/test-framework/common/src/main/java/io/quarkus/test/common/DefaultNativeImageLauncher.java @@ -267,6 +267,6 @@ public void includeAsSysProps(Map systemProps) { @Override public void close() { - quarkusProcess.destroy(); + LauncherUtil.destroyProcess(quarkusProcess); } } diff --git a/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java b/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java index d07cf27b0016a0..76c2701fadded3 100644 --- a/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java +++ b/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java @@ -110,7 +110,7 @@ private static void ensureProcessIsAlive(Process quarkusProcess) { * Try to destroy the process normally a few times * and resort to forceful destruction if necessary */ - private static void destroyProcess(Process quarkusProcess) { + static void destroyProcess(Process quarkusProcess) { quarkusProcess.destroy(); int i = 0; while (i++ < 10) {