Skip to content

Commit adf2c44

Browse files
committed
Set registerShutdownHook to false for tests
Update SpringApplicationContextLoader so that setRegisterShutdownHook is false for tests. Fixes gh-3763
1 parent b4e0a77 commit adf2c44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public ApplicationContext loadContext(final MergedContextConfiguration config)
8282
throws Exception {
8383
assertValidAnnotations(config.getTestClass());
8484
SpringApplication application = getSpringApplication();
85+
application.setRegisterShutdownHook(false);
8586
application.setMainApplicationClass(config.getTestClass());
8687
application.setSources(getSources(config));
8788
ConfigurableEnvironment environment = new StandardEnvironment();

0 commit comments

Comments
 (0)