Skip to content

Commit

Permalink
Merge pull request #41923 from gsmet/kill-QuarkusProdModeTest
Browse files Browse the repository at this point in the history
Destroy QuarkusProdModeTest forcibly if not stopped
  • Loading branch information
gsmet authored Jul 16, 2024
2 parents 86a7bdf + 6fdcdcc commit fdbcaf1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.Properties;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
Expand Down Expand Up @@ -644,7 +645,11 @@ public void stop() {
try {
if (process != null) {
process.destroy();
process.waitFor();
boolean stopped = process.waitFor(1, TimeUnit.MINUTES);
if (!stopped) {
process.destroyForcibly();
process.waitFor(1, TimeUnit.MINUTES);
}
exitCode = process.exitValue();
}
} catch (InterruptedException ignored) {
Expand Down

0 comments on commit fdbcaf1

Please sign in to comment.