Protect against NPE in server tests

Update `AbstractApplicationLauncher` to not attempt to shutdown
the process if startup fails.
This commit is contained in:
Phillip Webb 2020-01-22 12:14:25 -08:00
parent e28338d6cd
commit b4229239ab
1 changed files with 3 additions and 1 deletions

View File

@ -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