Polish Spring Integration metrics support

See gh-7722
This commit is contained in:
Phillip Webb
2016-12-21 15:34:46 -08:00
parent d69e43b433
commit b87e02dde0
8 changed files with 86 additions and 67 deletions

View File

@@ -87,14 +87,17 @@ public class IntegrationAutoConfigurationTests {
MBeanServer mBeanServer = this.context.getBean(MBeanServer.class);
assertDomains(mBeanServer, true, "org.springframework.integration",
"org.springframework.integration.monitor");
assertThat(this.context.getBean(IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME)).isNotNull();
Object bean = this.context
.getBean(IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME);
assertThat(bean).isNotNull();
}
@Test
public void disableJmxIntegration() {
load("spring.jmx.enabled=false");
assertThat(this.context.getBeansOfType(MBeanServer.class)).hasSize(0);
assertThat(this.context.getBeansOfType(IntegrationManagementConfigurer.class)).isEmpty();
assertThat(this.context.getBeansOfType(IntegrationManagementConfigurer.class))
.isEmpty();
}
@Test