You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/06/07 20:54:23 UTC
[08/62] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
index d12a31c..54bc4a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.RegionRoleListenerAdapter;
import com.gemstone.gemfire.distributed.Role;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -27,6 +26,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the functionality of the {@link RegionRoleListener} class.
*
@@ -64,7 +64,7 @@ public class RegionReliabilityListenerDUnitTest extends ReliabilityTestCase {
Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp[vm]);
+ config.setProperty(ROLES, rolesProp[vm]);
getSystem(config);
}
});
@@ -83,7 +83,7 @@ public class RegionReliabilityListenerDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
index db3fedd..21e77d8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.util.RegionMembershipListenerAdapter;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.DM;
-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.distributed.internal.membership.InternalRole;
@@ -36,6 +35,8 @@ import java.io.ByteArrayOutputStream;
import java.util.*;
import java.util.concurrent.locks.Lock;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests region reliability defined by MembershipAttributes.
*
@@ -70,7 +71,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
}
}
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesValue.toString());
+ config.setProperty(ROLES, rolesValue.toString());
return getSystem(config);
}
@@ -430,7 +431,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -516,7 +517,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -597,7 +598,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -655,7 +656,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -738,7 +739,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -826,7 +827,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -869,7 +870,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -933,7 +934,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -1005,7 +1006,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -1047,7 +1048,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -1169,7 +1170,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -1334,7 +1335,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
index eee3071..385b79b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.Role;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
import com.gemstone.gemfire.test.dunit.*;
@@ -28,6 +27,8 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the functionality of the {@link RequiredRoles} class.
*
@@ -64,7 +65,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
@@ -126,7 +127,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp[vm]);
+ config.setProperty(ROLES, rolesProp[vm]);
getSystem(config);
}
});
@@ -134,7 +135,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
@@ -304,7 +305,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp[vm]);
+ config.setProperty(ROLES, rolesProp[vm]);
getSystem(config);
}
});
@@ -312,7 +313,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
index 51ab9c6..02d89ac 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
@@ -17,13 +17,14 @@
package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the performance of Regions when Roles are assigned.
*
@@ -115,7 +116,7 @@ public class RolePerformanceDUnitTest extends CacheTestCase {
public void run() {
Properties config = new Properties();
if (assignRoles) {
- config.setProperty(DistributionConfig.ROLES_NAME, vmRoles[vm][0]);
+ config.setProperty(ROLES, vmRoles[vm][0]);
}
getSystem(config);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
index de24694..79d90d4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
@@ -35,6 +35,8 @@ import java.util.LinkedList;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Test to make sure slow receiver queuing is working
*
@@ -250,7 +252,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
doCreateOtherVm(p, false);
int repeatCount = 2;
@@ -326,7 +328,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
doCreateOtherVm(p, false);
forceQueuing(r);
@@ -396,7 +398,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "2");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "2");
doCreateOtherVm(p, false);
forceQueuing(r);
@@ -448,7 +450,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
doCreateOtherVm(p, false);
{
VM vm = getOtherVm();
@@ -645,8 +647,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1"); // 1 meg
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1"); // 1 meg
doCreateOtherVm(p, false);
@@ -717,8 +719,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "500"); // 500 ms
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "500"); // 500 ms
doCreateOtherVm(p, true);
@@ -946,9 +948,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "86400000"); // max value
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
@@ -1153,9 +1155,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "86400000"); // max value
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
@@ -1309,9 +1311,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, String.valueOf(1000 * 4)); // 4 sec
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, String.valueOf(1000 * 4)); // 4 sec
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "86400000"); // max value
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
index e1aabc0..ba5a04d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
@@ -31,7 +31,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ResourceEvent;
import com.gemstone.gemfire.distributed.internal.ResourceEventsListener;
import com.gemstone.gemfire.distributed.internal.locks.DLockBatch;
@@ -55,6 +54,8 @@ import java.util.List;
import java.util.Properties;
import java.util.concurrent.CountDownLatch;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
//import com.gemstone.gemfire.internal.cache.locks.TXLockId;
public class TXDistributedDUnitTest extends CacheTestCase {
@@ -493,7 +494,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ p.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/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 3537232..09317c6 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
@@ -34,8 +34,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
/**
@@ -63,7 +62,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
config.setProperty(DistributionConfig.GROUPS_NAME, "");
config.setProperty(SystemConfigurationProperties.NAME, "");
@@ -123,7 +122,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
+ config.setProperty(ROLES, rolesProp);
config.setProperty(DistributionConfig.GROUPS_NAME, groupsProp);
InternalDistributedSystem system = getSystem(config);
@@ -195,7 +194,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
public void run() {
//disconnectFromDS();
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, vmRoles[vm]);
+ config.setProperty(ROLES, vmRoles[vm]);
getSystem(config);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
index 455e8ae..6fb1702 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
@@ -16,13 +16,10 @@
*/
package com.gemstone.gemfire.distributed;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-
import java.io.PrintStream;
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.*;
/**
* This program is used to measure the amount of time it takes to
@@ -102,7 +99,7 @@ public class DistributedSystemConnectPerf {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(LOG_LEVEL, "info");
props.setProperty(LOCATORS,
"localhost[" + port + "]");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
index e267e41..1d8bb7d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
@@ -73,7 +73,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties p = getDistributedSystemProperties();
p.put(LOCATORS, "");
p.put(START_LOCATOR, "localhost[" + locatorPort + "]");
- p.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ p.put(DISABLE_TCP, "true");
InternalDistributedSystem ds = (InternalDistributedSystem)DistributedSystem.connect(p);
try {
// construct a member ID that will represent a departed member
@@ -142,7 +142,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
// set a flow-control property for the test (bug 37562)
- config.setProperty(DistributionConfig.MCAST_FLOW_CONTROL_NAME, "3000000,0.20,3000");
+ config.setProperty(MCAST_FLOW_CONTROL, "3000000,0.20,3000");
DistributedSystem system1 = DistributedSystem.connect(config);
DistributedSystem system2 = DistributedSystem.connect(config);
@@ -160,7 +160,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.MCAST_FLOW_CONTROL_NAME, "3000000,0.20,3000");
+ config.setProperty(MCAST_FLOW_CONTROL, "3000000,0.20,3000");
DistributedSystem system1 = DistributedSystem.connect(config);
@@ -192,7 +192,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
DistributedSystem system1 = DistributedSystem.connect(config);
system1.disconnect();
int time = DistributionConfig.DEFAULT_ACK_WAIT_THRESHOLD + 17;
- config.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME,
+ config.put(ACK_WAIT_THRESHOLD,
String.valueOf(time));
DistributedSystem system2 = DistributedSystem.connect(config);
system2.disconnect();
@@ -293,7 +293,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
int unicastPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
config.put(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// Minimum 3 ports required in range for UDP, FD_SOCK and TcpConduit.
- config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME,
+ config.setProperty(MEMBERSHIP_PORT_RANGE,
""+unicastPort+"-"+(unicastPort+2));
InternalDistributedSystem system = getSystem(config);
DistributionManager dm = (DistributionManager)system.getDistributionManager();
@@ -338,7 +338,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
int portRange = 3;
int portStartRange = getPortRange(portRange);
int portEndRange = portStartRange + portRange - 1;
- config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "" + (portStartRange) + "-" + (portEndRange));
+ config.setProperty(MEMBERSHIP_PORT_RANGE, "" + (portStartRange) + "-" + (portEndRange));
InternalDistributedSystem system = getSystem(config);
Cache cache = CacheFactory.create(system);
cache.addCacheServer();
@@ -363,7 +363,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
final int unicastPort = socketPorts[0];
config.setProperty(MCAST_PORT, String.valueOf(mcastPort));
config.setProperty(START_LOCATOR, "localhost[" + socketPorts[1] + "]");
- config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME,
+ config.setProperty(MEMBERSHIP_PORT_RANGE,
""+unicastPort+"-"+(unicastPort+2));
InternalDistributedSystem system = (InternalDistributedSystem)DistributedSystem.connect(config);
try {
@@ -407,7 +407,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "");
+ config.setProperty(CACHE_XML_FILE, "");
DistributedSystem sys = DistributedSystem.connect(config);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/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 8506620..95592f2 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
@@ -136,18 +136,18 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(START_LOCATOR, locators);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- properties.put(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, "com.gemstone.gemfire.distributed.AuthInitializer.create");
- properties.put(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, "com.gemstone.gemfire.distributed.MyAuthenticator.create");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- properties.put(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ properties.put(SECURITY_PEER_AUTH_INIT, "com.gemstone.gemfire.distributed.AuthInitializer.create");
+ properties.put(SECURITY_PEER_AUTHENTICATOR, "com.gemstone.gemfire.distributed.MyAuthenticator.create");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
+ properties.put(USE_CLUSTER_CONFIGURATION, "false");
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
InternalDistributedMember mbr = system.getDistributedMember();
assertEquals("expected the VM to have NORMAL vmKind",
DistributionManager.NORMAL_DM_TYPE, system.getDistributedMember().getVmKind());
properties.remove(START_LOCATOR);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
properties.put(LOCATORS, locators);
SerializableRunnable startSystem = new SerializableRunnable("start system") {
public void run() {
@@ -206,7 +206,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
});
properties.put(START_LOCATOR, locators);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
System.out.println("done connecting distributed system. Membership view is " +
MembershipManagerHelper.getMembershipManager(system).getView());
@@ -270,11 +270,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableCallable startLocator1 = new SerializableCallable("start locator1") {
@Override
@@ -377,7 +377,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
File logFile = new File("");
@@ -493,12 +493,12 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
// properties.put("log-level", "fine");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
final String uname = getUniqueName();
@@ -626,10 +626,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -771,11 +771,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -908,10 +908,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable disconnect =
new SerializableRunnable("Disconnect from " + locators) {
@@ -1093,8 +1093,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
try {
Properties locProps = new Properties();
locProps.setProperty(MCAST_PORT, "0");
- locProps.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
- locProps.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ locProps.setProperty(MEMBER_TIMEOUT, "1000");
+ locProps.put(ENABLE_CLUSTER_CONFIGURATION, "false");
Locator.startLocatorAndDS(port, logFile, locProps);
} catch (IOException ex) {
@@ -1111,7 +1111,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
+ props.setProperty(MEMBER_TIMEOUT, "1000");
DistributedSystem.connect(props);
}
};
@@ -1121,7 +1121,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
+ props.setProperty(MEMBER_TIMEOUT, "1000");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
@@ -1189,8 +1189,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties props = new Properties();
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable connect =
new SerializableRunnable("Connect to " + locators) {
@@ -1324,7 +1324,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties dsProps = new Properties();
dsProps.setProperty(LOCATORS, locators);
dsProps.setProperty(MCAST_PORT, "0");
- dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
vm0.invoke(new SerializableRunnable("Start locator on " + port1) {
public void run() {
@@ -1441,9 +1441,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties dsProps = new Properties();
dsProps.setProperty(LOCATORS, locators);
- dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- dsProps.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ dsProps.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
startLocatorSync(vm0, new Object[] { port1, dsProps });
startLocatorSync(vm1, new Object[] { port2, dsProps });
@@ -1651,10 +1651,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
Locator.startLocatorAndDS(port1, logFile, null, props);
} catch (IOException ex) {
@@ -1669,10 +1669,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
Locator.startLocatorAndDS(port2, logFile, null, props);
} catch (IOException ex) {
com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port2, ex);
@@ -1686,9 +1686,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
DistributedSystem.connect(props);
}
};
@@ -1699,9 +1699,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
WaitCriterion ev = new WaitCriterion() {
@@ -1753,7 +1753,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
system.disconnect();
} finally {
@@ -1798,7 +1798,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
DistributedSystem.connect(props);
}
};
@@ -1832,7 +1832,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties p = new Properties();
p.setProperty(LOCATORS, Host.getHost(0).getHostName() + "[" + port1 + "]");
p.setProperty(MCAST_PORT, "0");
- p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
if (stateFile.exists()) {
stateFile.delete();
}
@@ -1917,7 +1917,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
System.setProperty("p2p.joinTimeout", "1000");
Properties locProps = new Properties();
locProps.put(MCAST_PORT, "0");
- locProps.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ locProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
Locator.startLocatorAndDS(port, logFile, locProps);
} catch (IOException ex) {
com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port, ex);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/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 46cd55f..63e0514 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
@@ -40,7 +40,7 @@ import java.lang.management.ManagementFactory;
import java.net.BindException;
import java.net.InetAddress;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -73,7 +73,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
.build();
@@ -89,7 +89,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
assertNotNull(distributedSystem);
assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
- assertEquals("config", distributedSystem.getProperties().getProperty(DistributionConfig.LOG_LEVEL_NAME));
+ assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
} catch (Throwable e) {
this.errorCollector.addError(e);
@@ -117,7 +117,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
try {
@@ -169,7 +169,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -222,7 +222,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -272,7 +272,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setMemberName(getUniqueName())
.setPort(this.locatorPort)
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertTrue(builder.getForce());
this.launcher = builder.build();
@@ -340,7 +340,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
assertEquals(this.locatorPort, this.launcher.getPort().intValue());
@@ -422,7 +422,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setMemberName(getUniqueName())
.setPort(this.locatorPort)
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -499,7 +499,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
int pid = 0;
@@ -551,7 +551,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
RuntimeException expected = null;
@@ -613,7 +613,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -676,7 +676,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -739,7 +739,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -791,7 +791,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index 8b87539..d222ca5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -51,6 +51,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
@@ -980,7 +981,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getAbsolutePath());
command.add("-cp");
command.add(System.getProperty("java.class.path"));
- command.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "mcast-port=0");
+ command.add("-D" + DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT+"=0");
command.add(LocatorLauncher.class.getName());
command.add(LocatorLauncher.Command.START.getName());
command.add(LocatorLauncherForkingProcess.class.getSimpleName() + "_Locator");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
index 466b818..0dee924 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
@@ -29,8 +29,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
-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 setting of Roles in a DistributedSystem
@@ -62,7 +61,7 @@ public class RoleDUnitTest extends DistributedTestCase {
distributionProperties = new Properties();
distributionProperties.setProperty(MCAST_PORT, "0");
distributionProperties.setProperty(LOCATORS, "");
- distributionProperties.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
+ distributionProperties.setProperty(ROLES, rolesProp);
InternalDistributedSystem system = getSystem(distributionProperties);
try {
@@ -107,8 +106,8 @@ public class RoleDUnitTest extends DistributedTestCase {
public void run() {
disconnectFromDS();
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, vmRoles[vm]);
- config.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ config.setProperty(ROLES, vmRoles[vm]);
+ config.setProperty(LOG_LEVEL, "fine");
distributionProperties = config;
getSystem();
}
@@ -158,7 +157,7 @@ public class RoleDUnitTest extends DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
+ config.setProperty(ROLES, rolesProp);
distributionProperties = config;
InternalDistributedSystem system = getSystem();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/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 e8c1afb..b48a797 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
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.distributed;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Scope;
@@ -91,7 +93,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
.build();
@@ -109,7 +111,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
assertNotNull(distributedSystem);
assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
- assertEquals("config", distributedSystem.getProperties().getProperty(DistributionConfig.LOG_LEVEL_NAME));
+ assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
@@ -141,7 +143,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -197,7 +199,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -252,7 +254,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -301,7 +303,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -357,7 +359,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -414,7 +416,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setForce(true)
.setMemberName(getUniqueName())
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
assertTrue(builder.getForce());
@@ -489,7 +491,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
CacheXmlGenerator.generate(creation, pw);
pw.close();
- System.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.getCanonicalPath());
+ System.setProperty(CACHE_XML_FILE, cacheXmlFile.getCanonicalPath());
// start server
final Builder builder = new Builder()
@@ -497,7 +499,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setServerPort(freeTCPPorts[1])
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -558,7 +560,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
CacheXmlGenerator.generate(creation, pw);
pw.close();
- System.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.getCanonicalPath());
+ System.setProperty(CACHE_XML_FILE, cacheXmlFile.getCanonicalPath());
// start server
final Builder builder = new Builder()
@@ -566,7 +568,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setServerPort(this.serverPort)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -616,7 +618,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -695,7 +697,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setDisableDefaultServer(true)
.setMemberName(getUniqueName())
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -777,7 +779,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setServerPort(freeTCPPort)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -837,7 +839,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -903,7 +905,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -969,7 +971,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -1026,7 +1028,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
index c2ccf2f..a3508d3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
@@ -47,6 +47,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
@@ -643,7 +644,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
// launch server and specify a different port
final List<String> jvmArguments = getJvmArguments();
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + DistributionConfig.CACHE_XML_FILE_NAME + "=" + cacheXmlFile.getCanonicalPath());
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + CACHE_XML_FILE + "=" + cacheXmlFile.getCanonicalPath());
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
@@ -728,7 +729,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
// launch server and specify a different port
final List<String> jvmArguments = getJvmArguments();
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + DistributionConfig.CACHE_XML_FILE_NAME + "=" + cacheXmlFile.getCanonicalPath());
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + CACHE_XML_FILE + "=" + cacheXmlFile.getCanonicalPath());
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
@@ -1298,8 +1299,8 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
@Override
protected List<String> getJvmArguments() {
final List<String> jvmArguments = new ArrayList<String>();
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "log-level=config");
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "mcast-port=0");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.LOG_LEVEL+"=config");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.MCAST_PORT+"=0");
return jvmArguments;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
index 7eaa5e2..1da0de4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
@@ -26,6 +26,8 @@ import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class Bug40751DUnitTest extends CacheTestCase {
@@ -97,7 +99,7 @@ public class Bug40751DUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties props = new Properties();
System.setProperty("p2p.oldIO", "true");
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "true");
+ props.setProperty(CONSERVE_SOCKETS, "true");
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "12333");
// props.setProperty(DistributionConfig.DISABLE_TCP_NAME, "true");
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
index 99fd245..97c3a63 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.distributed.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
@@ -194,7 +196,7 @@ public class ConsoleDistributionManagerDUnitTest
String[] attNames = conf.getAttributeNames();
boolean foundIt = false;
for (int j=0; j<attNames.length; j++) {
- if (attNames[j].equals(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME)) {
+ if (attNames[j].equals(STATISTIC_SAMPLING_ENABLED)) {
foundIt = true;
assertEquals(conf.getAttribute(attNames[j]), "true");
break;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/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 6a23679..da367d7 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
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.distributed.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.UnmodifiableException;
import com.gemstone.gemfire.internal.ConfigSource;
@@ -138,7 +140,7 @@ public class DistributionConfigJUnitTest {
assertTrue(setter.getName().startsWith("set"));
assertEquals(setter.getParameterCount(), 1);
- if (!(attr.equalsIgnoreCase(DistributionConfig.LOG_LEVEL_NAME) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+ if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
Class clazz = attributes.get(attr).type();
try {
setter.invoke(mock(DistributionConfig.class), any(clazz));
@@ -158,7 +160,7 @@ public class DistributionConfigJUnitTest {
assertTrue(getter.getName().startsWith("get"));
assertEquals(getter.getParameterCount(), 0);
- if (!(attr.equalsIgnoreCase(DistributionConfig.LOG_LEVEL_NAME) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+ if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
Class clazz = attributes.get(attr).type();
Class returnClass = getter.getReturnType();
if (returnClass.isPrimitive()) {
@@ -205,10 +207,10 @@ public class DistributionConfigJUnitTest {
@Test
public void testGetAttributeObject() {
- assertEquals(config.getAttributeObject(DistributionConfig.LOG_LEVEL_NAME), "config");
+ 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(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME).getClass(), Boolean.class);
+ assertEquals(config.getAttributeObject(ENABLE_CLUSTER_CONFIGURATION).getClass(), Boolean.class);
}
@Test
@@ -250,16 +252,16 @@ public class DistributionConfigJUnitTest {
}
assertEquals(modifiables.size(), 10);
- assertEquals(modifiables.get(0), DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME);
- assertEquals(modifiables.get(1), DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME);
+ 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(4), DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME);
- assertEquals(modifiables.get(5), DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME);
- assertEquals(modifiables.get(6), DistributionConfig.LOG_LEVEL_NAME);
- assertEquals(modifiables.get(7), DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
- assertEquals(modifiables.get(8), DistributionConfig.STATISTIC_SAMPLE_RATE_NAME);
- assertEquals(modifiables.get(9), DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
+ assertEquals(modifiables.get(4), LOG_DISK_SPACE_LIMIT);
+ assertEquals(modifiables.get(5), LOG_FILE_SIZE_LIMIT);
+ assertEquals(modifiables.get(6), LOG_LEVEL);
+ assertEquals(modifiables.get(7), STATISTIC_ARCHIVE_FILE);
+ assertEquals(modifiables.get(8), STATISTIC_SAMPLE_RATE);
+ assertEquals(modifiables.get(9), STATISTIC_SAMPLING_ENABLED);
}
@Test(expected = IllegalArgumentException.class)
@@ -269,7 +271,7 @@ public class DistributionConfigJUnitTest {
@Test(expected = UnmodifiableException.class)
public void testSetUnmodifiableAttributeObject() {
- config.setAttributeObject(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, 0, ConfigSource.api());
+ config.setAttributeObject(ARCHIVE_DISK_SPACE_LIMIT, 0, ConfigSource.api());
}
@Test
@@ -286,7 +288,7 @@ public class DistributionConfigJUnitTest {
@Test
public void testLogLevel() {
config.modifiable = true;
- config.setAttribute(DistributionConfig.LOG_LEVEL_NAME, "config", ConfigSource.api());
+ config.setAttribute(LOG_LEVEL, "config", ConfigSource.api());
assertEquals(config.getLogLevel(), 700);
config.setAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "debug", ConfigSource.api());
@@ -327,7 +329,7 @@ public class DistributionConfigJUnitTest {
props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
// add another non-security property to verify it won't get put in the security properties
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, 2);
+ props.put(ACK_WAIT_THRESHOLD, 2);
DistributionConfig config = new DistributionConfigImpl(props);
assertEquals(config.getSecurityProps().size(), 3);
@@ -340,7 +342,7 @@ public class DistributionConfigJUnitTest {
props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
// add another non-security property to verify it won't get put in the security properties
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, 2);
+ props.put(ACK_WAIT_THRESHOLD, 2);
props.put("security-username", "testName");
DistributionConfig config = new DistributionConfigImpl(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
index 325b3a2..c78c077 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
@@ -36,8 +36,7 @@ import org.junit.Assert;
import java.net.InetAddress;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.BIND_ADDRESS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This class tests the functionality of the {@link
@@ -248,13 +247,13 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
// in order to set a small ack-wait-threshold, we have to remove the
// system property established by the dunit harness
String oldAckWait = (String)System.getProperties()
- .remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
+ .remove(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD);
try {
final Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "3");
- props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "3");
+ props.setProperty(ACK_WAIT_THRESHOLD, "3");
+ props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "3");
props.setProperty(SystemConfigurationProperties.NAME, "putter");
getSystem(props);
@@ -313,7 +312,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
}
finally {
if (oldAckWait != null) {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD, oldAckWait);
}
}
}
@@ -390,13 +389,13 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
// in order to set a small ack-wait-threshold, we have to remove the
// system property established by the dunit harness
String oldAckWait = (String)System.getProperties()
- .remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
+ .remove(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD);
try {
final Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0"); // loner
- props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
- props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "5");
+ props.setProperty(ACK_WAIT_THRESHOLD, "5");
+ props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "5");
props.setProperty(SystemConfigurationProperties.NAME, "putter");
getSystem(props);
@@ -485,7 +484,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
}
finally {
if (oldAckWait != null) {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD, oldAckWait);
}
}
}
@@ -501,8 +500,8 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0"); // loner
// use a valid address that's not proper for this machine
props.setProperty(BIND_ADDRESS, "www.yahoo.com");
- props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
- props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "5");
+ props.setProperty(ACK_WAIT_THRESHOLD, "5");
+ props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "5");
try {
getSystem(props);
} catch (IllegalArgumentException e) {