diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/AbstractApplicationLauncher.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/AbstractApplicationLauncher.java index 508e9452d9..38e711ad20 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/AbstractApplicationLauncher.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/AbstractApplicationLauncher.java @@ -64,6 +64,12 @@ abstract class AbstractApplicationLauncher implements BeforeEachCallback { void destroyProcess() { if (this.process != null) { this.process.destroy(); + try { + this.process.waitFor(); + } + catch (InterruptedException ex) { + Thread.currentThread().interrupt(); + } } }