mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
1043239de0
commit
39140945b5
@ -77,23 +77,25 @@ public class IntegrationAutoConfigurationTests {
|
||||
"org.springframework.integration.monitor");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void parentContext() {
|
||||
this.context = new AnnotationConfigApplicationContext();
|
||||
this.context.register(JmxAutoConfiguration.class, IntegrationAutoConfiguration.class);
|
||||
this.context.register(JmxAutoConfiguration.class,
|
||||
IntegrationAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
AnnotationConfigApplicationContext parent = this.context;
|
||||
this.context = new AnnotationConfigApplicationContext();
|
||||
this.context.setParent(parent);
|
||||
this.context.register(JmxAutoConfiguration.class, IntegrationAutoConfiguration.class);
|
||||
this.context.register(JmxAutoConfiguration.class,
|
||||
IntegrationAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertNotNull(this.context.getBean(HeaderChannelRegistry.class));
|
||||
((ConfigurableApplicationContext) this.context.getParent()).close();
|
||||
this.context.close();
|
||||
}
|
||||
|
||||
private static void assertDomains(MBeanServer mBeanServer, boolean expected, String... domains) {
|
||||
private static void assertDomains(MBeanServer mBeanServer, boolean expected,
|
||||
String... domains) {
|
||||
List<String> actual = Arrays.asList(mBeanServer.getDomains());
|
||||
for (String domain : domains) {
|
||||
assertEquals(expected, actual.contains(domain));
|
||||
|
@ -136,4 +136,5 @@ public class FindMainClassTask extends DefaultTask {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user