mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-08 02:09:06 +00:00
Protect against NPE in server tests
Update `AbstractApplicationLauncher` to not attempt to shutdown the process if startup fails.
This commit is contained in:
+3
-1
@@ -57,7 +57,9 @@ abstract class AbstractApplicationLauncher implements BeforeEachCallback, AfterE
|
||||
|
||||
@Override
|
||||
public void afterEach(ExtensionContext context) throws Exception {
|
||||
this.process.destroy();
|
||||
if (this.process != null) {
|
||||
this.process.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user