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

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