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:12:43 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-77 505b45df3 -> 0b103c1db


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/0b103c1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0b103c1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0b103c1d

Branch: refs/heads/feature/GEODE-77
Commit: 0b103c1dbe4867c28904099668b7c85324a7e108
Parents: 505b45d
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Tue Sep 8 16:12:24 2015 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Tue Sep 8 16:12:24 2015 -0700

----------------------------------------------------------------------
 .../gemfire/internal/PdxRenameDUnitTest.java         | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b103c1d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
index def75c3..80e4cc0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.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;
@@ -37,10 +38,7 @@ public class PdxRenameDUnitTest  extends CacheTestCase{
   public void testPdxRenameVersioning() throws Exception {
     final String DS_NAME = "PdxRenameDUnitTestDiskStore";
     final String DS_NAME2 = "PdxRenameDUnitTestDiskStore2";
-    final Properties props = new Properties();
-    props.setProperty("mcast-port", Integer.toString(AvailablePortHelper.getRandomAvailablePortForDUnitSite()));
-    props.setProperty("locators", "");
-
+    final int[] locatorPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     final File f = new File(DS_NAME);
     f.mkdir();
     final File f2 = new File(DS_NAME2);
@@ -48,6 +46,11 @@ public class PdxRenameDUnitTest  extends CacheTestCase{
     this.filesToBeDeleted.add(DS_NAME);
     this.filesToBeDeleted.add(DS_NAME2);
     
+    final Properties props = new Properties();
+    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");
+    
     Host host = Host.getHost(0);
     VM vm1 = host.getVM(0);
     VM vm2 = host.getVM(1);
@@ -55,6 +58,7 @@ public class PdxRenameDUnitTest  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});
@@ -70,6 +74,7 @@ public class PdxRenameDUnitTest  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});
@@ -114,6 +119,7 @@ public class PdxRenameDUnitTest  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});
@@ -128,6 +134,7 @@ public class PdxRenameDUnitTest  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();


Mime
View raw message