http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java index 2a7c144..89db1eb 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java @@ -56,6 +56,8 @@ import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Implements the acceptor thread on the bridge server. Accepts connections from * the edge and starts up threads to process requests from these. @@ -601,13 +603,12 @@ public class AcceptorImpl extends Acceptor implements Runnable } String authenticator = this.cache.getDistributedSystem().getProperties() - .getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + .getProperty(SECURITY_CLIENT_AUTHENTICATOR); isAuthenticationRequired = (authenticator != null && authenticator.length() > 0) ? true : false; String postAuthzFactoryName = this.cache.getDistributedSystem() - .getProperties().getProperty( - DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME); + .getProperties().getProperty(SECURITY_CLIENT_ACCESSOR_PP); isPostAuthzCallbackPresent = (postAuthzFactoryName != null && postAuthzFactoryName .length() > 0) ? true : false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java index 517d497..ba2a7a8 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java @@ -54,6 +54,8 @@ import java.security.Principal; import java.util.*; import java.util.concurrent.*; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Class <code>CacheClientNotifier</code> works on the server and manages * client socket connections to clients requesting notification of updates and @@ -312,7 +314,7 @@ public class CacheClientNotifier { DistributedSystem system = this.getCache().getDistributedSystem(); Properties sysProps = system.getProperties(); String authenticator = sysProps - .getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + .getProperty(SECURITY_CLIENT_AUTHENTICATOR); //TODO;hitesh for conflation if (clientVersion.compareTo(Version.GFE_603) >= 0) { byte[] overrides = HandShake.extractOverrides(new byte[] { (byte) dis.read() }); @@ -349,13 +351,13 @@ public class CacheClientNotifier { securityLogWriter.fine("CacheClientNotifier: successfully verified credentials for proxyID: " + proxyID + " having principal: " + principal.getName()); } String postAuthzFactoryName = sysProps - .getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME); + .getProperty(SECURITY_CLIENT_ACCESSOR_PP); if (postAuthzFactoryName != null && postAuthzFactoryName.length() > 0) { if (principal == null) { securityLogWriter.warning( LocalizedStrings.CacheClientNotifier_CACHECLIENTNOTIFIER_POST_PROCESS_AUTHORIZATION_CALLBACK_ENABLED_BUT_AUTHENTICATION_CALLBACK_0_RETURNED_WITH_NULL_CREDENTIALS_FOR_PROXYID_1, new Object[] { - DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, proxyID }); + SECURITY_CLIENT_AUTHENTICATOR, proxyID }); } Method authzMethod = ClassLoadUtil .methodFromName(postAuthzFactoryName); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java index 8c2fda7..9bc8956 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java @@ -240,7 +240,7 @@ public class HandShake implements ClientHandShake // Note: credentials should always be the last piece in handshake for // Diffie-Hellman key exchange to work String authenticator = this.system.getProperties().getProperty( - DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + SECURITY_CLIENT_AUTHENTICATOR); if (clientVersion.compareTo(Version.GFE_603) >= 0) { setOverrides(new byte[] { dis.readByte() }); } else { @@ -1784,7 +1784,7 @@ public class HandShake implements ClientHandShake AuthenticationFailedException { String methodName = this.system.getProperties().getProperty( - DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + SECURITY_CLIENT_AUTHENTICATOR); return verifyCredentials(methodName, this.credentials, this.system .getSecurityProperties(), (InternalLogWriter)this.system.getLogWriter(), (InternalLogWriter)this.system .getSecurityLogWriter(), this.id.getDistributedMember()); @@ -1814,7 +1814,7 @@ public class HandShake implements ClientHandShake return; } String authenticator = this.system.getProperties().getProperty( - DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + SECURITY_CLIENT_AUTHENTICATOR); Properties peerWanProps = readCredentials(dis, dos, authenticator, this.system); verifyCredentials(authenticator, peerWanProps, this.system http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java index 0c99033..c35ccb5 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java @@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.client.internal.AbstractOp; import com.gemstone.gemfire.cache.client.internal.Connection; import com.gemstone.gemfire.distributed.DistributedSystem; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import com.gemstone.gemfire.internal.Assert; import com.gemstone.gemfire.internal.HeapDataOutputStream; @@ -61,6 +60,8 @@ import java.util.Random; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingQueue; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Provides an implementation for the server socket end of the hierarchical * cache connection. Each server connection runs in its own thread to maximize @@ -1035,7 +1036,7 @@ public class ServerConnection implements Runnable { DistributedSystem system = this.getDistributedSystem(); String methodName = system.getProperties().getProperty( - DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + SECURITY_CLIENT_AUTHENTICATOR); Principal principal = HandShake.verifyCredentials(methodName, credentials, system.getSecurityProperties(), (InternalLogWriter)system.getLogWriter(), (InternalLogWriter)system http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java index ea90e6e..01c36bd 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java @@ -47,6 +47,8 @@ import java.net.SocketTimeoutException; import java.security.Principal; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * A <code>ServerHandShakeProcessor</code> verifies the client's version compatibility with server. * @@ -362,9 +364,9 @@ public class ServerHandShakeProcessor { Properties systemProperties = system.getProperties(); //hitesh:auth callbacks String authzFactoryName = systemProperties - .getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME); + .getProperty(SECURITY_CLIENT_ACCESSOR); String postAuthzFactoryName = systemProperties - .getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME); + .getProperty(SECURITY_CLIENT_ACCESSOR_PP); AuthorizeRequest authzRequest = null; AuthorizeRequestPP postAuthzRequest = null; @@ -377,7 +379,7 @@ public class ServerHandShakeProcessor { if (securityLogWriter.warningEnabled()) { securityLogWriter.warning( LocalizedStrings.ServerHandShakeProcessor_0_AUTHORIZATION_ENABLED_BUT_AUTHENTICATION_CALLBACK_1_RETURNED_WITH_NULL_CREDENTIALS_FOR_PROXYID_2, - new Object[] {connection.getName(), DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, connection.getProxyID()}); + new Object[] {connection.getName(), SECURITY_CLIENT_AUTHENTICATOR, connection.getProxyID()}); } } authzRequest = new AuthorizeRequest(authzFactoryName, @@ -393,7 +395,7 @@ public class ServerHandShakeProcessor { if (securityLogWriter.warningEnabled()) { securityLogWriter.warning( LocalizedStrings.ServerHandShakeProcessor_0_POSTPROCESS_AUTHORIZATION_ENABLED_BUT_NO_AUTHENTICATION_CALLBACK_2_IS_CONFIGURED, - new Object[] {connection.getName(), DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME}); + new Object[] {connection.getName(), SECURITY_CLIENT_AUTHENTICATOR}); } } postAuthzRequest = new AuthorizeRequestPP( http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java index 892bff8..5cfa58d 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java @@ -48,6 +48,8 @@ import java.util.Properties; import java.util.Set; import java.util.concurrent.Callable; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + public class GeodeSecurityUtil { private static Logger logger = LogService.getLogger(); @@ -231,8 +233,8 @@ public class GeodeSecurityUtil { if(securityProps==null) return; - String shiroConfig = securityProps.getProperty(DistributionConfig.SECURITY_SHIRO_INIT_NAME); - String customAuthenticator =securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + String shiroConfig = securityProps.getProperty(DistributionConfig.SECURITY_SHIRO_INIT); + String customAuthenticator =securityProps.getProperty(SECURITY_CLIENT_AUTHENTICATOR); if (!com.gemstone.gemfire.internal.lang.StringUtils.isBlank(shiroConfig)) { IniSecurityManagerFactory factory = new IniSecurityManagerFactory("classpath:"+shiroConfig); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java index 4a29dd3..2bb5183 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java @@ -17,7 +17,6 @@ package com.gemstone.gemfire.internal.security.shiro; import com.gemstone.gemfire.cache.operations.OperationContext; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.ClassLoadUtil; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import com.gemstone.gemfire.internal.lang.StringUtils; @@ -44,6 +43,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import static com.gemstone.gemfire.management.internal.security.ResourceConstants.ACCESS_DENIED_MESSAGE; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; public class CustomAuthRealm extends AuthorizingRealm{ public static final String REALM_NAME = "CUSTOMAUTHREALM"; @@ -58,9 +58,9 @@ public class CustomAuthRealm extends AuthorizingRealm{ public CustomAuthRealm(Properties securityProps) { this.securityProps = securityProps; - this.authzFactoryName = securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME); - this.postAuthzFactoryName = securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME); - this.authenticatorFactoryName = securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME); + this.authzFactoryName = securityProps.getProperty(SECURITY_CLIENT_ACCESSOR); + this.postAuthzFactoryName = securityProps.getProperty(SECURITY_CLIENT_ACCESSOR_PP); + this.authenticatorFactoryName = securityProps.getProperty(SECURITY_CLIENT_AUTHENTICATOR); this.cachedAuthZCallback = new ConcurrentHashMap<>(); this.cachedPostAuthZCallback = new ConcurrentHashMap<>(); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java index d19c59f..a3d78ed 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java @@ -49,6 +49,8 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** <p>Connection is a socket holder that sends and receives serialized message objects. A Connection may be closed to preserve system resources and will automatically be reopened when it's needed.</p> @@ -2335,7 +2337,7 @@ public class Connection implements Runnable { String authInit = System .getProperty(DistributionConfigImpl.SECURITY_SYSTEM_PREFIX - + DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME); + + SECURITY_PEER_AUTH_INIT); boolean isSecure = authInit != null && authInit.length() != 0; if (isSecure) { @@ -3855,7 +3857,7 @@ public class Connection implements Runnable { try { String authInit = System .getProperty(DistributionConfigImpl.SECURITY_SYSTEM_PREFIX - + DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME); + + SECURITY_PEER_AUTH_INIT); boolean isSecure = authInit!= null && authInit.length() != 0 ; if (isSecure) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java index f386726..aa0241e 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java @@ -69,6 +69,7 @@ import com.gemstone.gemfire.management.internal.configuration.domain.SharedConfi import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusRequest; import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusResponse; import com.gemstone.gemfire.management.internal.security.ResourceOperation; +import com.gemstone.gemfire.security.AuthenticationFailedException; import org.springframework.shell.core.annotation.CliAvailabilityIndicator; import org.springframework.shell.core.annotation.CliCommand; import org.springframework.shell.core.annotation.CliOption; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java index d199648..7f3847a 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java @@ -46,6 +46,8 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicBoolean; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * OperationInvoker JMX Implementation * @@ -109,7 +111,7 @@ public class JmxOperationInvoker implements OperationInvoker { Entry<String, String> entry = it.next(); String key = entry.getKey(); String value = entry.getValue(); - if (key.startsWith("javax.") || key.startsWith("cluster-ssl") || key.startsWith(DistributionConfig.JMX_MANAGER_SSL_NAME)) { + if (key.startsWith("javax.") || key.startsWith("cluster-ssl") || key.startsWith(JMX_MANAGER_SSL)) { key = checkforSystemPropertyPrefix(entry.getKey()); if((key.equals(Gfsh.SSL_ENABLED_CIPHERS) || key.equals(Gfsh.SSL_ENABLED_PROTOCOLS)) && "any".equals(value)){ continue; @@ -224,7 +226,7 @@ public class JmxOperationInvoker implements OperationInvoker { String returnKey = key; if (key.startsWith("javax.")) returnKey = key; - if (key.startsWith("cluster-ssl") || key.startsWith(DistributionConfig.JMX_MANAGER_SSL_NAME)) { + if (key.startsWith("cluster-ssl") || key.startsWith(JMX_MANAGER_SSL)) { if (key.endsWith("keystore")) { returnKey = Gfsh.SSL_KEYSTORE; } else if (key.endsWith("keystore-password")) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java index 4b61979..615823c 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java @@ -36,8 +36,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.Properties; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; /** * Tests cacheserver ssl support added. See https://svn.gemstone.com/trac/gemfire/ticket/48995 for details @@ -108,23 +107,18 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase { String cacheServerSslprotocols = "any"; String cacheServerSslciphers = "any"; boolean cacheServerSslRequireAuth = true; - gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, - String.valueOf(cacheServerSslenabled)); - gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, - cacheServerSslprotocols); - gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, - cacheServerSslciphers); - gemFireProps.put( - DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, - String.valueOf(cacheServerSslRequireAuth)); + gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled)); + gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols); + gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers); + gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth)); String keyStore = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, SERVER_KEY_STORE); String trustStore = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, SERVER_TRUST_STORE); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks"); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStore); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password"); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStore); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password"); + gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks"); + gemFireProps.put(SERVER_SSL_KEYSTORE, keyStore); + gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password"); + gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStore); + gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); @@ -149,21 +143,21 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase { String keyStorePath = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, keyStore); String trustStorePath = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, trustStore); //using new server-ssl-* properties - gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, + gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled)); - gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, + gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols); - gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, + gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers); gemFireProps.put( - DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, + SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth)); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks"); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStorePath); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password"); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStorePath); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password"); + gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks"); + gemFireProps.put(SERVER_SSL_KEYSTORE, keyStorePath); + gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password"); + gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStorePath); + gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java index c9d5e84..86691f9 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java @@ -34,8 +34,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.Properties; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; /** * Test for GEODE-396 @@ -101,23 +100,23 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase { String cacheServerSslprotocols = "any"; String cacheServerSslciphers = "any"; boolean cacheServerSslRequireAuth = false; - gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, + gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled)); - gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, + gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols); - gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, + gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers); gemFireProps.put( - DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, + SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth)); String keyStore = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, DEFAULT_STORE); String trustStore = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, DEFAULT_STORE); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks"); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStore); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password"); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStore); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password"); + gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks"); + gemFireProps.put(SERVER_SSL_KEYSTORE, keyStore); + gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password"); + gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStore); + gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); @@ -142,21 +141,21 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase { String keyStorePath = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, keyStore); String trustStorePath = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, trustStore); //using new server-ssl-* properties - gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, + gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled)); - gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, + gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols); - gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, + gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers); gemFireProps.put( - DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, + SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth)); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks"); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStorePath); - gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password"); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStorePath); - gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password"); + gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks"); + gemFireProps.put(SERVER_SSL_KEYSTORE, keyStorePath); + gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password"); + gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStorePath); + gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password"); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java index 824192d..986bf5a 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java @@ -26,7 +26,6 @@ import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache30.CacheSerializableRunnable; import com.gemstone.gemfire.cache30.ClientServerTestCase; import com.gemstone.gemfire.distributed.DistributedMember; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import com.gemstone.gemfire.internal.cache.*; @@ -43,8 +42,7 @@ import org.junit.experimental.categories.Category; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; /** * Tests the Off-Heap Memory thresholds of {@link ResourceManager} @@ -1761,7 +1759,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase { private Properties getOffHeapProperties() { Properties p = new Properties(); p.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]"); - p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m"); + p.setProperty(OFF_HEAP_MEMORY_SIZE, "1m"); return p; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java index 2bdcb88..e63ac6d 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java @@ -68,9 +68,9 @@ public class QueryParamsAuthorizationDUnitTest extends CacheTestCase { public Object call() throws Exception { CacheFactory cf = new CacheFactory() .set(MCAST_PORT, "0") - .set(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, + .set(SECURITY_CLIENT_ACCESSOR, "com.gemstone.gemfire.cache.query.dunit.QueryAuthorization.create") - .set(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create"); + .set(SECURITY_CLIENT_AUTHENTICATOR, DummyAuthenticator.class.getName() + ".create"); Cache cache = getCache(cf); cache.createRegionFactory(RegionShortcut.REPLICATE).create(regName); CacheServer server = cache.addCacheServer(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java index 1d94573..800c8f9 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java @@ -246,7 +246,7 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase { CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0") .set(LOG_LEVEL, "error") .setPdxSerializer(new MyPdxSerializer()) - .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1"); + .set(DISTRIBUTED_SYSTEM_ID, "1"); cache = cf.create(); RegionType rt = RegionType.REPLICATE; @@ -266,7 +266,7 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase { CacheFactory cf2 = new CacheFactory().set(MCAST_PORT, "0") .set(LOG_LEVEL, "error") .setPdxSerializer(new MyPdxSerializer()) - .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "100"); + .set(DISTRIBUTED_SYSTEM_ID, "100"); cache = cf2.create(); final Map<Integer, Object> read = new HashMap<Integer, Object>(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java index 0c9dfaa..045d82e 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java @@ -20,7 +20,6 @@ import com.gemstone.gemfire.CopyHelper; import com.gemstone.gemfire.DataSerializable; import com.gemstone.gemfire.DataSerializer; import com.gemstone.gemfire.cache.*; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.NanoTimer; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue; @@ -39,6 +38,8 @@ import java.util.Properties; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * * @since GemFire bugfix5.7 @@ -337,7 +338,7 @@ public class Bug38741DUnitTest extends ClientServerTestCase { public Properties getDistributedSystemProperties() { Properties props = new Properties(); - props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false"); + props.setProperty(DELTA_PROPAGATION, "false"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java index aaa585a..56ee019 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java @@ -414,8 +414,8 @@ public class CacheLogRollDUnitTest extends CacheTestCase { props.put(LOG_FILE, logfile); props.put(LOG_FILE_SIZE_LIMIT, "1"); props.put(LOG_LEVEL, "config"); - props.put(DistributionConfig.SECURITY_LOG_FILE_NAME, sec_logfile); - props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config"); + props.put(SECURITY_LOG_FILE, sec_logfile); + props.put(SECURITY_LOG_LEVEL, "config"); DistributedSystem ds = getSystem(props); InternalDistributedSystem ids = (InternalDistributedSystem) ds; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java index 6ba30f2..3a2ee73 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java @@ -39,6 +39,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException; import java.util.List; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest { private static final long serialVersionUID = -6437436147079728413L; @@ -58,7 +60,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest { @SuppressWarnings("rawtypes") public void testEnableOffHeapMemory() { try { - System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m"); + System.setProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE, "1m"); final String regionName = "testEnableOffHeapMemory"; @@ -82,7 +84,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest { assertEquals(true, ((LocalRegion)regionAfter).getOffHeap()); regionAfter.localDestroyRegion(); } finally { - System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME); + System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE); } } @@ -158,7 +160,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest { final float high = 95.0f; try { - System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m"); + System.setProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE, "1m"); Cache c; ResourceManagerCreation rmc = new ResourceManagerCreation(); @@ -236,7 +238,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest { assertEquals(0f, c.getResourceManager().getEvictionOffHeapPercentage()); assertEquals(0f, c.getResourceManager().getCriticalOffHeapPercentage()); } finally { - System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME); + System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java index c9c059a..6253bad 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java @@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Distributed Ack Overflow Region with ConcurrencyChecksEnabled and OffHeap memory. * @@ -55,7 +56,7 @@ public class DistributedAckOverflowRegionCCEOffHeapDUnitTest extends Distributed @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java index f81b0df..ebafa99 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java @@ -18,12 +18,13 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Distributed Ack Persistent Region with ConcurrencyChecksEnabled and OffHeap memory. @@ -55,7 +56,7 @@ public class DistributedAckPersistentRegionCCEOffHeapDUnitTest extends Distribut @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java index 3b7a065..5802d76 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java @@ -58,7 +58,7 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT Properties p = super.getDistributedSystemProperties(); p.put(CONSERVE_SOCKETS, "false"); if (distributedSystemID > 0) { - p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+distributedSystemID); + p.put(DISTRIBUTED_SYSTEM_ID, ""+distributedSystemID); } return p; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java index f1ba65e..505b1eb 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java @@ -18,12 +18,12 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; /** * Tests Distributed Ack Region with ConcurrencyChecksEnabled and OffHeap memory. @@ -55,7 +55,7 @@ public class DistributedAckRegionCCEOffHeapDUnitTest extends DistributedAckRegio @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java index 2f6bea9..7033533 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java @@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Distributed Ack Region with OffHeap memory. * @@ -55,7 +56,7 @@ public class DistributedAckRegionOffHeapDUnitTest extends DistributedAckRegionDU @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java index 7c302b5..1ec0d65 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java @@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Distributed Ack Region with ConcurrencyChecksEnabled and OffHeap memory. * @@ -55,7 +56,7 @@ public class DistributedNoAckRegionCCEOffHeapDUnitTest extends DistributedNoAckR @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java index de7b4df..83e2df3 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java @@ -18,13 +18,13 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; /** * Tests Distributed NoAck Region with OffHeap memory. * @@ -55,7 +55,7 @@ public class DistributedNoAckRegionOffHeapDUnitTest extends DistributedNoAckRegi @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java index f068360..d1e53f7 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java @@ -61,7 +61,7 @@ public class GlobalRegionCCEDUnitTest extends GlobalRegionDUnitTest { Properties p = super.getDistributedSystemProperties(); p.put(CONSERVE_SOCKETS, "false"); if (distributedSystemID > 0) { - p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + p.put(DISTRIBUTED_SYSTEM_ID, "" + distributedSystemID); } return p; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java index 1ac1966..2bc57d6 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java @@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Global Region with ConcurrencyChecksEnabled and OffHeap memory. * @@ -55,7 +56,7 @@ public class GlobalRegionCCEOffHeapDUnitTest extends GlobalRegionCCEDUnitTest { @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java index 95ce20a..8d660f3 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java @@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Global Region with OffHeap memory. * @@ -62,7 +63,7 @@ public class GlobalRegionOffHeapDUnitTest extends GlobalRegionDUnitTest { @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java index 5dc4848..90f2931 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java @@ -16,7 +16,6 @@ */ package com.gemstone.gemfire.cache30; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType; @@ -26,6 +25,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests the basic functionality of the lru eviction * controller and its statistics using off-heap regions. @@ -57,7 +58,7 @@ public class OffHeapLRUEvictionControllerDUnitTest extends @Override public Properties getDistributedSystemProperties() { Properties properties = super.getDistributedSystemProperties(); - properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m"); + properties.setProperty(OFF_HEAP_MEMORY_SIZE, "100m"); return properties; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java index ae2a698..04165fc 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java @@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.RegionAttributes; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.cache.OffHeapTestUtil; import com.gemstone.gemfire.test.dunit.Invoke; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import java.util.Properties; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; + /** * Tests Partitioned Region with OffHeap memory. * @@ -54,7 +55,7 @@ public class PartitionedRegionOffHeapDUnitTest extends PartitionedRegionDUnitTes @Override public Properties getDistributedSystemProperties() { Properties props = super.getDistributedSystemProperties(); - props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m"); + props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m"); return props; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java index aa87ad7..555d01b 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java @@ -30,6 +30,7 @@ import java.io.FileWriter; import java.util.Properties; import static org.assertj.core.api.Assertions.assertThat; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; /** * Integration tests for AbstractLauncher class. These tests require file system I/O. @@ -51,8 +52,8 @@ public class AbstractLauncherIntegrationTest { this.gemfirePropertiesFile = this.temporaryFolder.newFile(DistributionConfig.GEMFIRE_PREFIX + "properties"); this.expectedGemfireProperties = new Properties(); - this.expectedGemfireProperties.setProperty(SystemConfigurationProperties.NAME, "memberOne"); - this.expectedGemfireProperties.setProperty(DistributionConfig.GROUPS_NAME, "groupOne, groupTwo"); + this.expectedGemfireProperties.setProperty(NAME, "memberOne"); + this.expectedGemfireProperties.setProperty(GROUPS, "groupOne, groupTwo"); this.expectedGemfireProperties.store(new FileWriter(this.gemfirePropertiesFile, false), this.testName.getMethodName()); assertThat(this.gemfirePropertiesFile).isNotNull(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java index 09317c6..8dc0d03 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java @@ -63,7 +63,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase { config.setProperty(MCAST_PORT, "0"); config.setProperty(LOCATORS, ""); config.setProperty(ROLES, ""); - config.setProperty(DistributionConfig.GROUPS_NAME, ""); + config.setProperty(GROUPS, ""); config.setProperty(SystemConfigurationProperties.NAME, ""); InternalDistributedSystem system = getSystem(config); @@ -123,7 +123,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase { config.setProperty(MCAST_PORT, "0"); config.setProperty(LOCATORS, ""); config.setProperty(ROLES, rolesProp); - config.setProperty(DistributionConfig.GROUPS_NAME, groupsProp); + config.setProperty(GROUPS, groupsProp); InternalDistributedSystem system = getSystem(config); try { @@ -277,7 +277,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase { public void run() { //disconnectFromDS(); Properties config = new Properties(); - config.setProperty(DistributionConfig.GROUPS_NAME, makeGroupsString(vm)); + config.setProperty(GROUPS, makeGroupsString(vm)); getSystem(config); } }); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java index 95592f2..77abf1d 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java @@ -271,7 +271,7 @@ public class LocatorDUnitTest extends DistributedTestCase { properties.put(MCAST_PORT, "0"); properties.put(LOCATORS, locators); properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false"); - properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true"); + properties.put(DISABLE_AUTO_RECONNECT, "true"); properties.put(MEMBER_TIMEOUT, "2000"); properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel()); properties.put(ENABLE_CLUSTER_CONFIGURATION, "false"); @@ -378,7 +378,7 @@ public class LocatorDUnitTest extends DistributedTestCase { properties.put(MCAST_PORT, "0"); properties.put(LOCATORS, locators); properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true"); - properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true"); + properties.put(DISABLE_AUTO_RECONNECT, "true"); File logFile = new File(""); if (logFile.exists()) { @@ -494,7 +494,7 @@ public class LocatorDUnitTest extends DistributedTestCase { properties.put(MCAST_PORT, "0"); properties.put(LOCATORS, locators); properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true"); - properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true"); + properties.put(DISABLE_AUTO_RECONNECT, "true"); properties.put(MEMBER_TIMEOUT, "2000"); properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel()); // properties.put("log-level", "fine"); @@ -627,7 +627,7 @@ public class LocatorDUnitTest extends DistributedTestCase { properties.put(MCAST_PORT, "0"); properties.put(LOCATORS, locators); properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true"); - properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true"); + properties.put(DISABLE_AUTO_RECONNECT, "true"); properties.put(MEMBER_TIMEOUT, "2000"); properties.put(ENABLE_CLUSTER_CONFIGURATION, "false"); @@ -772,7 +772,7 @@ public class LocatorDUnitTest extends DistributedTestCase { properties.put(MCAST_PORT, "0"); properties.put(LOCATORS, locators); properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true"); - properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true"); + properties.put(DISABLE_AUTO_RECONNECT, "true"); properties.put(MEMBER_TIMEOUT, "2000"); properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel()); properties.put(ENABLE_CLUSTER_CONFIGURATION, "false"); @@ -909,7 +909,7 @@ public class LocatorDUnitTest extends DistributedTestCase { properties.put(MCAST_PORT, "0"); properties.put(LOCATORS, locators); properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true"); - properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true"); + properties.put(DISABLE_AUTO_RECONNECT, "true"); properties.put(MEMBER_TIMEOUT, "2000"); properties.put(ENABLE_CLUSTER_CONFIGURATION, "false"); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java index 38c4dab..6d34bed 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java @@ -49,7 +49,7 @@ import java.net.InetAddress; import java.util.*; import java.util.function.IntSupplier; -import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT; +import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*; import static com.gemstone.gemfire.internal.AvailablePort.SOCKET; import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort; import static org.junit.Assert.*; @@ -105,10 +105,10 @@ public class LocatorJUnitTest { Properties dsprops = new Properties(); int jmxPort = getRandomAvailablePort(SOCKET); dsprops.setProperty(MCAST_PORT, "0"); - dsprops.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "" + jmxPort); - dsprops.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true"); - dsprops.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0"); - dsprops.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false"); + dsprops.setProperty(JMX_MANAGER_PORT, "" + jmxPort); + dsprops.setProperty(JMX_MANAGER_START, "true"); + dsprops.setProperty(JMX_MANAGER_HTTP_PORT, "0"); + dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false"); System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "disableManagement", "false"); // not needed try { locator = Locator.startLocatorAndDS(port, new File("testJmxManager.log"), dsprops); @@ -135,8 +135,8 @@ public class LocatorJUnitTest { public void testNoThreadLeftBehind() throws Exception { Properties dsprops = new Properties(); dsprops.setProperty(MCAST_PORT, "0"); - dsprops.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false"); - dsprops.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false"); + dsprops.setProperty(JMX_MANAGER_START, "false"); + dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false"); JGroupsMessenger.THROW_EXCEPTION_ON_START_HOOK = true; int threadCount = Thread.activeCount(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java index 63e0514..4285ed9 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java @@ -72,7 +72,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher .setPort(this.locatorPort) .setWorkingDirectory(this.workingDirectory) .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory) - .set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true") + .set(DISABLE_AUTO_RECONNECT, "true") .set(LOG_LEVEL, "config") .set(MCAST_PORT, "0") .build(); @@ -87,7 +87,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher final DistributedSystem distributedSystem = locator.getDistributedSystem(); assertNotNull(distributedSystem); - assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME)); + assertEquals("true", distributedSystem.getProperties().getProperty(DISABLE_AUTO_RECONNECT)); assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT)); assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL)); assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME)); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java index b48a797..d039aef 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java @@ -92,7 +92,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn .setForce(true) .setMemberName(getUniqueName()) .setWorkingDirectory(rootFolder) - .set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true") + .set(DISABLE_AUTO_RECONNECT, "true") .set(LOG_LEVEL, "config") .set(MCAST_PORT, "0") .build(); @@ -110,7 +110,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn final DistributedSystem distributedSystem = cache.getDistributedSystem(); assertNotNull(distributedSystem); - assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME)); + assertEquals("true", distributedSystem.getProperties().getProperty(DISABLE_AUTO_RECONNECT)); assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL)); assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT)); assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME)); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java index da367d7..2c5391d 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java @@ -140,7 +140,7 @@ public class DistributionConfigJUnitTest { assertTrue(setter.getName().startsWith("set")); assertEquals(setter.getParameterCount(), 1); - if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) { + if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(SECURITY_LOG_LEVEL))) { Class clazz = attributes.get(attr).type(); try { setter.invoke(mock(DistributionConfig.class), any(clazz)); @@ -160,7 +160,7 @@ public class DistributionConfigJUnitTest { assertTrue(getter.getName().startsWith("get")); assertEquals(getter.getParameterCount(), 0); - if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) { + if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(SECURITY_LOG_LEVEL))) { Class clazz = attributes.get(attr).type(); Class returnClass = getter.getReturnType(); if (returnClass.isPrimitive()) { @@ -208,8 +208,8 @@ public class DistributionConfigJUnitTest { @Test public void testGetAttributeObject() { assertEquals(config.getAttributeObject(LOG_LEVEL), "config"); - assertEquals(config.getAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME), "config"); - assertEquals(config.getAttributeObject(DistributionConfig.REDUNDANCY_ZONE_NAME), ""); + assertEquals(config.getAttributeObject(SECURITY_LOG_LEVEL), "config"); + assertEquals(config.getAttributeObject(REDUNDANCY_ZONE), ""); assertEquals(config.getAttributeObject(ENABLE_CLUSTER_CONFIGURATION).getClass(), Boolean.class); } @@ -235,8 +235,8 @@ public class DistributionConfigJUnitTest { } } assertEquals(modifiables.size(), 2); - assertEquals(modifiables.get(0), DistributionConfig.HTTP_SERVICE_PORT_NAME); - assertEquals(modifiables.get(1), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME); + assertEquals(modifiables.get(0), HTTP_SERVICE_PORT); + assertEquals(modifiables.get(1), JMX_MANAGER_HTTP_PORT); } @Test @@ -254,8 +254,8 @@ public class DistributionConfigJUnitTest { assertEquals(modifiables.size(), 10); assertEquals(modifiables.get(0), ARCHIVE_DISK_SPACE_LIMIT); assertEquals(modifiables.get(1), ARCHIVE_FILE_SIZE_LIMIT); - assertEquals(modifiables.get(2), DistributionConfig.HTTP_SERVICE_PORT_NAME); - assertEquals(modifiables.get(3), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME); + assertEquals(modifiables.get(2), HTTP_SERVICE_PORT); + assertEquals(modifiables.get(3), JMX_MANAGER_HTTP_PORT); assertEquals(modifiables.get(4), LOG_DISK_SPACE_LIMIT); assertEquals(modifiables.get(5), LOG_FILE_SIZE_LIMIT); assertEquals(modifiables.get(6), LOG_LEVEL); @@ -276,13 +276,13 @@ public class DistributionConfigJUnitTest { @Test public void testValidAttributeObject() { - config.setAttributeObject(DistributionConfig.HTTP_SERVICE_PORT_NAME, 8080, ConfigSource.api()); + config.setAttributeObject(HTTP_SERVICE_PORT, 8080, ConfigSource.api()); assertEquals(config.getHttpServicePort(), 8080); } @Test(expected = IllegalArgumentException.class) public void testOutOfRangeAttributeObject() { - config.setAttributeObject(DistributionConfig.HTTP_SERVICE_PORT_NAME, -1, ConfigSource.api()); + config.setAttributeObject(HTTP_SERVICE_PORT, -1, ConfigSource.api()); } @Test @@ -291,7 +291,7 @@ public class DistributionConfigJUnitTest { config.setAttribute(LOG_LEVEL, "config", ConfigSource.api()); assertEquals(config.getLogLevel(), 700); - config.setAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "debug", ConfigSource.api()); + config.setAttributeObject(SECURITY_LOG_LEVEL, "debug", ConfigSource.api()); assertEquals(config.getSecurityLogLevel(), 500); } @@ -313,21 +313,21 @@ public class DistributionConfigJUnitTest { @Test public void testAttributesAlwaysModifiable() { config.modifiable = false; - assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME)); - assertTrue(config.isAttributeModifiable(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME)); + assertTrue(config.isAttributeModifiable(HTTP_SERVICE_PORT)); + assertTrue(config.isAttributeModifiable(JMX_MANAGER_HTTP_PORT)); config.modifiable = true; - assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME)); - assertTrue(config.isAttributeModifiable(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME)); + assertTrue(config.isAttributeModifiable(HTTP_SERVICE_PORT)); + assertTrue(config.isAttributeModifiable(JMX_MANAGER_HTTP_PORT)); } @Test public void testSecurityProps(){ Properties props = new Properties(); - props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create"); - props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create"); - props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config"); + props.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create"); + props.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create"); + props.put(SECURITY_LOG_LEVEL, "config"); // add another non-security property to verify it won't get put in the security properties props.put(ACK_WAIT_THRESHOLD, 2); @@ -338,9 +338,9 @@ public class DistributionConfigJUnitTest { @Test public void testSecurityPropsWithNoSetter(){ Properties props = new Properties(); - props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create"); - props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create"); - props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config"); + props.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create"); + props.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create"); + props.put(SECURITY_LOG_LEVEL, "config"); // add another non-security property to verify it won't get put in the security properties props.put(ACK_WAIT_THRESHOLD, 2); props.put("security-username", "testName"); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java index ed5a60f..e9f2fb6 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java @@ -568,7 +568,7 @@ public class InternalDistributedSystemJUnitTest try { System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, "finest"); Properties apiProps = new Properties(); - apiProps.setProperty(DistributionConfig.GROUPS_NAME, "foo, bar"); + apiProps.setProperty(GROUPS, "foo, bar"); { if (propFileExisted) { propFile.renameTo(new File(DistributionConfig.GEMFIRE_PREFIX + "properties.sav")); @@ -591,7 +591,7 @@ public class InternalDistributedSystemJUnitTest } DistributionConfigImpl dci = new DistributionConfigImpl(apiProps); assertEquals(null, dci.getAttributeSource(MCAST_PORT)); - assertEquals(ConfigSource.api(), dci.getAttributeSource(DistributionConfig.GROUPS_NAME)); + assertEquals(ConfigSource.api(), dci.getAttributeSource(GROUPS)); assertEquals(ConfigSource.sysprop(), dci.getAttributeSource(LOG_LEVEL)); assertEquals(ConfigSource.Type.FILE, dci.getAttributeSource("name").getType()); assertEquals(ConfigSource.Type.SECURE_FILE, dci.getAttributeSource(STATISTIC_SAMPLE_RATE).getType()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java index da8e8de..5291181 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java @@ -103,7 +103,7 @@ public class MembershipJUnitTest { nonDefault.put(MCAST_PORT, String.valueOf(mcastPort)); nonDefault.put(LOG_FILE, ""); nonDefault.put(LOG_LEVEL, "fine"); - nonDefault.put(DistributionConfig.GROUPS_NAME, "red, blue"); + nonDefault.put(GROUPS, "red, blue"); nonDefault.put(MEMBER_TIMEOUT, "2000"); nonDefault.put(LOCATORS, localHost.getHostName() + '[' + port + ']'); DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
