Polish
This commit is contained in:
parent
1043239de0
commit
39140945b5
|
@ -77,23 +77,25 @@ public class IntegrationAutoConfigurationTests {
|
||||||
"org.springframework.integration.monitor");
|
"org.springframework.integration.monitor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void parentContext() {
|
public void parentContext() {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
this.context.register(JmxAutoConfiguration.class, IntegrationAutoConfiguration.class);
|
this.context.register(JmxAutoConfiguration.class,
|
||||||
|
IntegrationAutoConfiguration.class);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
AnnotationConfigApplicationContext parent = this.context;
|
AnnotationConfigApplicationContext parent = this.context;
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
this.context.setParent(parent);
|
this.context.setParent(parent);
|
||||||
this.context.register(JmxAutoConfiguration.class, IntegrationAutoConfiguration.class);
|
this.context.register(JmxAutoConfiguration.class,
|
||||||
|
IntegrationAutoConfiguration.class);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
assertNotNull(this.context.getBean(HeaderChannelRegistry.class));
|
assertNotNull(this.context.getBean(HeaderChannelRegistry.class));
|
||||||
((ConfigurableApplicationContext) this.context.getParent()).close();
|
((ConfigurableApplicationContext) this.context.getParent()).close();
|
||||||
this.context.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());
|
List<String> actual = Arrays.asList(mBeanServer.getDomains());
|
||||||
for (String domain : domains) {
|
for (String domain : domains) {
|
||||||
assertEquals(expected, actual.contains(domain));
|
assertEquals(expected, actual.contains(domain));
|
||||||
|
|
|
@ -136,4 +136,5 @@ public class FindMainClassTask extends DefaultTask {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue