geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject incubator-geode git commit: GEODE-1062: Removed similar/duplicate createReceiver methods
Date Tue, 05 Apr 2016 22:17:45 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop a11f6089b -> 3f755fa2a


GEODE-1062: Removed similar/duplicate createReceiver methods


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

Branch: refs/heads/develop
Commit: 3f755fa2a723cc04b056621d8e61061646ae7c38
Parents: a11f608
Author: Jason Huynh <huynhja@gmail.com>
Authored: Mon Apr 4 15:09:27 2016 -0700
Committer: Jason Huynh <huynhja@gmail.com>
Committed: Tue Apr 5 15:10:27 2016 -0700

----------------------------------------------------------------------
 .../gemfire/internal/cache/wan/WANTestBase.java | 37 --------------------
 .../ConcurrentWANPropogation_1_DUnitTest.java   |  4 +--
 ...downAllPersistentGatewaySenderDUnitTest.java |  4 +--
 ...tewaySenderDistributedDeadlockDUnitTest.java |  4 +--
 .../SerialGatewaySenderQueueDUnitTest.java      |  4 +--
 .../serial/SerialWANPropogationDUnitTest.java   | 12 +++----
 6 files changed, 14 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f755fa2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index afc534b..130f960 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -2814,25 +2814,6 @@ public class WANTestBase extends DistributedTestCase{
     return sb.toString();
   }
 
-  public static int createReceiverAfterCache(int locPort) {
-    WANTestBase test = new WANTestBase(getTestMethodName());
-    GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
-    int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
-    fact.setStartPort(port);
-    fact.setEndPort(port);
-    fact.setManualStart(true);
-    GatewayReceiver receiver = fact.create();
-    try {
-      receiver.start();
-    }
-    catch (IOException e) {
-      e.printStackTrace();
-      fail("Test " + test.getName()
-          + " failed to start GatewayRecevier on port " + port);
-    }
-    return port;
-  }
-
   public static void createReceiverAndServer(int locPort) {
     WANTestBase test = new WANTestBase(getTestMethodName());
     Properties props = test.getDistributedSystemProperties();
@@ -2974,24 +2955,6 @@ public class WANTestBase extends DistributedTestCase{
     return port;
   }
 
-  public static void createReceiver2(int locPort) {
-    WANTestBase test = new WANTestBase(getTestMethodName());
-    GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
-    int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
-    fact.setStartPort(port);
-    fact.setEndPort(port);
-    fact.setManualStart(true);
-    GatewayReceiver receiver = fact.create();
-    try {
-      receiver.start();
-    }
-    catch (IOException e) {
-      e.printStackTrace();
-      fail("Test " + test.getName()
-          + " failed to start GatewayRecevier on port " + port);
-    }
-  }
-
   public static void doDistTXPuts(String regionName, int numPuts) {
     CacheTransactionManager txMgr = cache.getCacheTransactionManager();
     txMgr.setDistributed(true);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f755fa2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
index b95437c..d29a995 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
@@ -84,8 +84,8 @@ public class ConcurrentWANPropogation_1_DUnitTest extends WANTestBase {
     vm3.invoke(() -> WANTestBase.createReplicatedRegion(
       getTestMethodName() + "_RR", null, isOffHeap() ));
   
-    vm2.invoke(() -> WANTestBase.createReceiver2(nyPort ));
-    vm3.invoke(() -> WANTestBase.createReceiver2(nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver(nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver(nyPort ));
     
     vm4.invoke(() -> WANTestBase.validateRegionSize(
         getTestMethodName() + "_RR", 1000 ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f755fa2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
index f821ab1..92e318c 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
@@ -61,7 +61,7 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase
{
 
     vm2.invoke(() -> WANTestBase.createCache( nyPort ));
     vm3.invoke(() -> WANTestBase.createCache( nyPort ));
-    vm2.invoke(() -> WANTestBase.createReceiverAfterCache( nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
     vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName()
+ "_PR", "ln", 1, 100, isOffHeap() ));
     vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion( getTestMethodName()
+ "_PR", "ln", 1, 100, isOffHeap() ));
@@ -124,7 +124,7 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase
{
             "vm1's region size before restart gatewayhub is " + region.size());
       }
     });
-    vm2.invoke(() -> WANTestBase.createReceiverAfterCache( nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
     // wait for vm0 to finish its work
     vm4_future.join(MAX_WAIT);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f755fa2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
index 93979f0..eb75afa 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderDistributedDeadlockDUnitTest.java
@@ -196,7 +196,7 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
         //create receiver
         vm2.invoke(() -> WANTestBase.createReplicatedRegion(
           getTestMethodName() + "_RR", null, false));
-        vm2.invoke(() -> WANTestBase.createReceiverAfterCache(nyPort));
+        vm2.invoke(() -> WANTestBase.createReceiver(nyPort));
 
         //create senders
         vm4.invoke(() -> WANTestBase.createReplicatedRegion(
@@ -235,7 +235,7 @@ public class SerialGatewaySenderDistributedDeadlockDUnitTest extends WANTestBase
         vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + "_RR",
                                                                                 "", 0, 113,
false));
 
-        vm2.invoke(() -> WANTestBase.createReceiverAfterCache(nyPort));
+        vm2.invoke(() -> WANTestBase.createReceiver(nyPort));
 
         //create sender vms
         vm4.invoke(() -> WANTestBase.createPartitionedRegion(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f755fa2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
index d77fdcf..f2de5de 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
@@ -67,8 +67,8 @@ public class SerialGatewaySenderQueueDUnitTest extends WANTestBase{
     vm3.invoke(() -> WANTestBase.createReplicatedRegion(
         getTestMethodName() + "_RR", null, isOffHeap() ));
 
-    vm2.invoke(() -> WANTestBase.createReceiver2( nyPort ));
-    vm3.invoke(() -> WANTestBase.createReceiver2( nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
     
     vm4.invoke(() -> WANTestBase.createCache( lnPort ));
     vm5.invoke(() -> WANTestBase.createCache( lnPort ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f755fa2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
index d656e98..e6be1d5 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
@@ -75,8 +75,8 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
 
     createCacheInVMs(nyPort, vm2, vm3);
 
-    vm2.invoke(() -> WANTestBase.createReceiver2(nyPort ));
-    vm3.invoke(() -> WANTestBase.createReceiver2(nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver(nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver(nyPort ));
 
     vm2.invoke(() -> WANTestBase.createReplicatedRegion(
         getTestMethodName() + "_RR", null, isOffHeap()  ));
@@ -131,8 +131,8 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
     vm3.invoke(() -> WANTestBase.createReplicatedRegion(
       getTestMethodName() + "_RR", null, isOffHeap()  ));
 
-    vm2.invoke(() -> WANTestBase.createReceiver2(nyPort ));
-    vm3.invoke(() -> WANTestBase.createReceiver2(nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver(nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver(nyPort ));
 
     Thread.sleep(5000);
 
@@ -188,8 +188,8 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
     vm3.invoke(() -> WANTestBase.createReplicatedRegion(
       getTestMethodName() + "_RR", null, isOffHeap()  ));
   
-    vm2.invoke(() -> WANTestBase.createReceiver2( nyPort ));
-    vm3.invoke(() -> WANTestBase.createReceiver2( nyPort ));
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
 
 


Mime
View raw message