Skip to content

Commit da3920b

Browse files
committed
Wait for process to exit to avoid race with file deletion
See gh-25457
1 parent c5cfb87 commit da3920b

File tree

1 file changed

+6
-0
lines changed
  • spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded

1 file changed

+6
-0
lines changed

spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/AbstractApplicationLauncher.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ public void beforeEach(ExtensionContext context) throws Exception {
6464
void destroyProcess() {
6565
if (this.process != null) {
6666
this.process.destroy();
67+
try {
68+
this.process.waitFor();
69+
}
70+
catch (InterruptedException ex) {
71+
Thread.currentThread().interrupt();
72+
}
6773
}
6874
}
6975

0 commit comments

Comments
 (0)