Pull up setDisableMBeanRegistry
Issue: 44070
This commit is contained in:
committed by
Phillip Webb
parent
8a1a5160c3
commit
232ed597a8
@@ -588,6 +588,15 @@ class TomcatWebServerFactoryCustomizerTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void enableMBeanRegistry() {
|
||||
bind("server.tomcat.mbeanregistry.enabled=true");
|
||||
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
|
||||
assertThat(factory.isDisableMBeanRegistry()).isTrue();
|
||||
this.customizer.customize(factory);
|
||||
assertThat(factory.isDisableMBeanRegistry()).isFalse();
|
||||
}
|
||||
|
||||
private void bind(String... inlinedProperties) {
|
||||
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.environment, inlinedProperties);
|
||||
Binder binder = new Binder(ConfigurationPropertySources.get(this.environment));
|
||||
|
||||
Reference in New Issue
Block a user