geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject incubator-geode git commit: GEODE-77 changed a test to use locators instead of multicast discovery
Date Tue, 08 Sep 2015 23:16:09 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-77 0b103c1db -> 4d5f6aa4f


GEODE-77 changed a test to use locators instead of multicast discovery


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4d5f6aa4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4d5f6aa4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4d5f6aa4

Branch: refs/heads/feature/GEODE-77
Commit: 4d5f6aa4f20e81bb56b3097ad526f9819a155ef4
Parents: 0b103c1
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Tue Sep 8 16:15:56 2015 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Tue Sep 8 16:15:56 2015 -0700

----------------------------------------------------------------------
 .../gemfire/internal/PdxDeleteFieldDUnitTest.java      | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d5f6aa4/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
index 1746b25..24c6c53 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
@@ -14,6 +14,7 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
 import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
 import com.gemstone.gemfire.pdx.PdxInstance;
 import com.gemstone.gemfire.pdx.PdxReader;
@@ -36,9 +37,13 @@ public class PdxDeleteFieldDUnitTest  extends CacheTestCase{
   public void testPdxDeleteFieldVersioning() throws Exception {
     final String DS_NAME = "PdxDeleteFieldDUnitTestDiskStore";
     final String DS_NAME2 = "PdxDeleteFieldDUnitTestDiskStore2";
+    
     final Properties props = new Properties();
-    props.setProperty("mcast-port", Integer.toString(AvailablePortHelper.getRandomAvailablePortForDUnitSite()));
-    props.setProperty("locators", "");
+    final int[] locatorPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+    props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+    props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+locatorPorts[0]+"],localhost["+locatorPorts[1]+"]");
+    props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+
     final File f = new File(DS_NAME);
     f.mkdir();
     final File f2 = new File(DS_NAME2);
@@ -53,6 +58,7 @@ public class PdxDeleteFieldDUnitTest  extends CacheTestCase{
     vm1.invoke(new SerializableCallable() {
       public Object call() throws Exception {
         disconnectFromDS();
+        props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[0]+"]");
         final Cache cache = (new CacheFactory(props)).setPdxPersistent(true).setPdxDiskStore(DS_NAME).create();
         DiskStoreFactory dsf = cache.createDiskStoreFactory();
         dsf.setDiskDirs(new File[]{f});
@@ -68,6 +74,7 @@ public class PdxDeleteFieldDUnitTest  extends CacheTestCase{
     vm2.invoke(new SerializableCallable() {
       public Object call() throws Exception {
         disconnectFromDS();
+        props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[1]+"]");
         final Cache cache = (new CacheFactory(props)).setPdxReadSerialized(true).setPdxPersistent(true).setPdxDiskStore(DS_NAME2).create();
         DiskStoreFactory dsf = cache.createDiskStoreFactory();
         dsf.setDiskDirs(new File[]{f2});
@@ -105,6 +112,7 @@ public class PdxDeleteFieldDUnitTest  extends CacheTestCase{
     
     vm1.invoke(new SerializableCallable() {
       public Object call() throws Exception {
+        props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[0]+"]");
         final Cache cache = (new CacheFactory(props)).setPdxPersistent(true).setPdxDiskStore(DS_NAME).create();
         DiskStoreFactory dsf = cache.createDiskStoreFactory();
         dsf.setDiskDirs(new File[]{f});
@@ -118,6 +126,7 @@ public class PdxDeleteFieldDUnitTest  extends CacheTestCase{
     
     vm2.invoke(new SerializableCallable() {
       public Object call() throws Exception {
+        props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[1]+"]");
         final Cache cache = (new CacheFactory(props)).setPdxReadSerialized(true).setPdxPersistent(true).setPdxDiskStore(DS_NAME2).create();
         
         DiskStoreFactory dsf = cache.createDiskStoreFactory();


Mime
View raw message