mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Set registerShutdownHook to false for tests
Update SpringApplicationContextLoader so that setRegisterShutdownHook is false for tests. Fixes gh-3763
This commit is contained in:
parent
b4e0a77269
commit
adf2c44bdd
@ -82,6 +82,7 @@ public class SpringApplicationContextLoader extends AbstractContextLoader {
|
|||||||
throws Exception {
|
throws Exception {
|
||||||
assertValidAnnotations(config.getTestClass());
|
assertValidAnnotations(config.getTestClass());
|
||||||
SpringApplication application = getSpringApplication();
|
SpringApplication application = getSpringApplication();
|
||||||
|
application.setRegisterShutdownHook(false);
|
||||||
application.setMainApplicationClass(config.getTestClass());
|
application.setMainApplicationClass(config.getTestClass());
|
||||||
application.setSources(getSources(config));
|
application.setSources(getSources(config));
|
||||||
ConfigurableEnvironment environment = new StandardEnvironment();
|
ConfigurableEnvironment environment = new StandardEnvironment();
|
||||||
|
Loading…
Reference in New Issue
Block a user