diff --git a/apache-geode-extensions/src/main/java/org/springframework/geode/util/GeodeConstants.java b/apache-geode-extensions/src/main/java/org/springframework/geode/util/GeodeConstants.java index 55d881de..b7c92a1e 100644 --- a/apache-geode-extensions/src/main/java/org/springframework/geode/util/GeodeConstants.java +++ b/apache-geode-extensions/src/main/java/org/springframework/geode/util/GeodeConstants.java @@ -13,20 +13,27 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.util; +import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.management.internal.security.ResourceConstants; /** - * The GeodeConstants class... + * Abstract utility class encapsulating common Apache Geode constants used by SBDG. * * @author John Blum - * @since 1.0.0 + * @since 1.3.0 */ public abstract class GeodeConstants { - public static final String USERNAME = ResourceConstants.USER_NAME; + // Logging Constants (referring to Properties) + public static final String LOG_DISK_SPACE_LIMIT = DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME; + public static final String LOG_FILE = DistributionConfig.LOG_FILE_NAME; + public static final String LOG_FILE_SIZE_LIMIT = DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME; + public static final String LOG_LEVEL = DistributionConfig.LOG_LEVEL_NAME; + + // Security Constants (referring to Properties) public static final String PASSWORD = ResourceConstants.PASSWORD; + public static final String USERNAME = ResourceConstants.USER_NAME; } diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java index fa57caec..a5f0d7f1 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java @@ -23,13 +23,13 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.apache.geode.cache.GemFireCache; -import org.apache.geode.distributed.internal.DistributionConfig; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport; import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; +import org.springframework.geode.util.GeodeConstants; import org.springframework.test.context.junit4.SpringRunner; /** @@ -72,10 +72,10 @@ public class LoggingAutoConfigurationIntegrationTests extends IntegrationTestsSu Properties distributedSystemProperties = this.gemfireCache.getDistributedSystem().getProperties(); - assertThat(distributedSystemProperties.getProperty(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME)).isEqualTo("4096"); - assertThat(distributedSystemProperties.getProperty(DistributionConfig.LOG_FILE_NAME)).isEqualTo("/path/to/gemfire.log"); - assertThat(distributedSystemProperties.getProperty(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME)).isEqualTo("512"); - assertThat(distributedSystemProperties.getProperty(DistributionConfig.LOG_LEVEL_NAME)).isEqualTo("fine"); + assertThat(distributedSystemProperties.getProperty(GeodeConstants.LOG_DISK_SPACE_LIMIT)).isEqualTo("4096"); + assertThat(distributedSystemProperties.getProperty(GeodeConstants.LOG_FILE)).isEqualTo("/path/to/gemfire.log"); + assertThat(distributedSystemProperties.getProperty(GeodeConstants.LOG_FILE_SIZE_LIMIT)).isEqualTo("512"); + assertThat(distributedSystemProperties.getProperty(GeodeConstants.LOG_LEVEL)).isEqualTo("fine"); } @SpringBootApplication