Polish "Make sure Hazelcast shutdown logs are available"
See gh-32184
This commit is contained in:
parent
24f3b2b1b7
commit
960b034875
|
@ -51,6 +51,7 @@ import org.springframework.util.StringUtils;
|
|||
class HazelcastServerConfiguration {
|
||||
|
||||
static final String CONFIG_SYSTEM_PROPERTY = "hazelcast.config";
|
||||
|
||||
static final String HAZELCAST_LOGGING_TYPE = "hazelcast.logging.type";
|
||||
|
||||
private static HazelcastInstance getHazelcastInstance(Config config) {
|
||||
|
@ -126,7 +127,7 @@ class HazelcastServerConfiguration {
|
|||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(org.slf4j.Logger.class)
|
||||
static class LoggingHazelcastConfigCustomizerConfiguration {
|
||||
static class HazelcastLoggingConfigCustomizerConfiguration {
|
||||
|
||||
@Bean
|
||||
@Order(0)
|
||||
|
|
|
@ -207,7 +207,7 @@ class HazelcastAutoConfigurationServerTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void configWithDefaultLoggingTypeSlf4j() {
|
||||
void autoConfiguredConfigSetsHazelcastLoggingToSlf4j() {
|
||||
this.contextRunner.run((context) -> {
|
||||
Config config = context.getBean(HazelcastInstance.class).getConfig();
|
||||
assertThat(config.getProperty(HazelcastServerConfiguration.HAZELCAST_LOGGING_TYPE)).isEqualTo("slf4j");
|
||||
|
@ -215,7 +215,7 @@ class HazelcastAutoConfigurationServerTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
void configWithExplicitLoggingType() {
|
||||
void autoConfiguredConfigCanOverrideHazelcastLogging() {
|
||||
this.contextRunner.withUserConfiguration(HazelcastConfigWithJDKLogging.class).run((context) -> {
|
||||
Config config = context.getBean(HazelcastInstance.class).getConfig();
|
||||
assertThat(config.getProperty(HazelcastServerConfiguration.HAZELCAST_LOGGING_TYPE)).isEqualTo("jdk");
|
||||
|
|
Loading…
Reference in New Issue