From 09b41a33e8870f1c52bef7ec61bb81db563885f2 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 3 Aug 2017 21:00:22 +0100 Subject: [PATCH] Wait for process to exit when stopping DevTools integration test apps --- .../boot/devtools/tests/DevToolsIntegrationTests.java | 2 +- .../boot/devtools/tests/LaunchedApplication.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java b/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java index d732a31b33..6458452d01 100644 --- a/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java +++ b/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java @@ -78,7 +78,7 @@ public class DevToolsIntegrationTests { } @After - public void stopApplication() { + public void stopApplication() throws InterruptedException { this.launchedApplication.stop(); } diff --git a/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/LaunchedApplication.java b/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/LaunchedApplication.java index bc360fa406..03614442a0 100644 --- a/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/LaunchedApplication.java +++ b/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/LaunchedApplication.java @@ -37,9 +37,10 @@ class LaunchedApplication { this.processes = processes; } - void stop() { + void stop() throws InterruptedException { for (Process process : this.processes) { process.destroy(); + process.waitFor(); } }