Wait for process to exit to avoid race with file deletion

See gh-25457
This commit is contained in:
Andy Wilkinson 2021-03-03 17:55:37 +00:00
parent c5cfb8750b
commit da3920bd46

View File

@ -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();
}
}
}