geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [62/63] [abbrv] incubator-geode git commit: Removing a few more statics
Date Fri, 19 Feb 2016 18:37:39 GMT
Removing a few more statics

These are a few places I missed in my last checkin.


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

Branch: refs/heads/develop
Commit: f593119d2cea74ef8d75809c0c2e71b85bf0822e
Parents: 923e219
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Thu Feb 18 10:37:25 2016 -0800
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Thu Feb 18 10:37:25 2016 -0800

----------------------------------------------------------------------
 .../gemfire/cache30/RegionReliabilityTestCase.java   | 10 ++++++++--
 ...RClientServerFunctionExecutionNoAckDUnitTest.java |  8 ++++----
 ...ClientServerRegionFunctionExecutionDUnitTest.java |  5 +++--
 ...rRegionFunctionExecutionNoSingleHopDUnitTest.java |  2 +-
 ...unctionExecutionSelectorNoSingleHopDUnitTest.java |  2 +-
 ...verRegionFunctionExecutionSingleHopDUnitTest.java |  2 +-
 .../internal/cache/ha/HASlowReceiverDUnitTest.java   |  5 +++--
 .../internal/cache/ha/CQListGIIDUnitTest.java        | 15 +++++++++------
 .../NewWANConcurrencyCheckForDestroyDUnitTest.java   |  6 +-----
 .../SerialGatewaySenderEventListenerDUnitTest.java   |  5 ++---
 10 files changed, 33 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
index de0451e..8cc65d3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
@@ -1247,7 +1247,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase
{
     region.put("INVALIDATE_ME", "VAL");
       
     // define the afterReleaseLocalLocks callback
-    Runnable removeRequiredRole = new Runnable() {
+    SerializableRunnable removeRequiredRole = new SerializableRunnable() {
       public void run() {
         Host.getHost(0).getVM(1).invoke(new SerializableRunnable("Close Region") {
           public void run() {
@@ -1264,7 +1264,13 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase
{
 //        catch (InterruptedException e) {}
       }
     };
-    DistributedCacheOperation.setBeforePutOutgoing(removeRequiredRole);
+    DistributedCacheOperation.setBeforePutOutgoing(() -> {
+     try {
+       removeRequiredRole.run();
+     } catch(Exception e) {
+       throw new RuntimeException(e);
+     }
+    });
 
     Runnable reset = new Runnable() {
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
index c5eab0a..80d59ed 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
@@ -39,11 +39,11 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
    */
   private static final String TEST_FUNCTION1 = TestFunction.TEST_FUNCTION1;
 
-  static Boolean isByName = null;
+  Boolean isByName = null;
 
-  static Function functionNoAck = null;
-  static Function functionAck = null;
-  static Boolean toRegister = null;
+  Function functionNoAck = null;
+  Function functionAck = null;
+  Boolean toRegister = null;
   
   private static final int NUM_ITERATION=1;
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
index 56abb8c..0104e7a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
@@ -68,10 +68,10 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
   private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
 
   private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
-  static Boolean isByName = null;
+  Boolean isByName = null;
   
   private static int retryCount = 0;
-  static Boolean toRegister = null;
+  Boolean toRegister = null;
 
   private static Region metaDataRegion;
 
@@ -270,6 +270,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
+    toRegister = true;
     client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution(
isByName , toRegister));
   } 
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
index 005b1b5..ffcac65 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
@@ -61,7 +61,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
 
   private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
 
-  static Boolean isByName = null;
+  Boolean isByName = null;
 
   private static int retryCount = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
index 890841e..5a17f4d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
@@ -61,7 +61,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest
e
 
   private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
 
-  static Boolean isByName = null;
+  Boolean isByName = null;
 
   private static int retryCount = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
index a1c31d8..84da524 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
@@ -58,7 +58,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
     private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
 
     private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
-    static Boolean isByName = null;
+    Boolean isByName = null;
     
     private static int retryCount = 0;
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
index 6d21778..aa7964c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
@@ -55,7 +55,7 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
 
   protected static VM clientVM = null;
 
-  private static int PORT0;
+  private int PORT0;
 
   private int PORT1;
 
@@ -247,7 +247,8 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
   // Test slow client
   public void testSlowClient() throws Exception {
     setBridgeObeserverForAfterQueueDestroyMessage();
-    clientVM.invoke(() -> HASlowReceiverDUnitTest.createClientCache( NetworkUtils.getServerHostName(Host.getHost(0)),
new Integer(PORT0),
+    Host host = Host.getHost(0);
+    clientVM.invoke(() -> HASlowReceiverDUnitTest.createClientCache( NetworkUtils.getServerHostName(host),
new Integer(PORT0),
             new Integer(PORT1), new Integer(PORT2), new Integer(2) ));
     clientVM.invoke(() -> HASlowReceiverDUnitTest.registerInterest());
     // add expected socket exception string

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
b/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
index 5f3ab7d..6a3de04 100755
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
@@ -189,12 +189,15 @@ public class CQListGIIDUnitTest extends DistributedTestCase {
   
   public static Test suite() {
     Class[] classes = new Class[] {com.gemstone.gemfire.internal.cache.ha.CQListGIIDUnitTest.class,
- com.gemstone.gemfire.internal.cache.tier.sockets.DataSerializerPropogationDUnitTest.class,
- com.gemstone.gemfire.internal.cache.tier.sockets.EventIDVerificationDUnitTest.class,
- com.gemstone.gemfire.internal.cache.tier.sockets.EventIDVerificationInP2PDUnitTest.class,
- com.gemstone.gemfire.internal.cache.tier.sockets.UpdatePropagationDUnitTest.class,
- com.gemstone.gemfire.internal.cache.tier.sockets.UpdatePropagationPRDUnitTest.class,
- com.gemstone.gemfire.security.DeltaClientPostAuthorizationDUnitTest.class};
+        com.gemstone.gemfire.cache30.RegionReliabilityDistAckDUnitTest.class,
+        com.gemstone.gemfire.cache30.RegionReliabilityGlobalDUnitTest.class,
+        com.gemstone.gemfire.internal.cache.execute.PRClientServerFunctionExecutionNoAckDUnitTest.class,
+        com.gemstone.gemfire.internal.cache.execute.PRClientServerRegionFunctionExecutionDUnitTest.class,
+        com.gemstone.gemfire.internal.cache.execute.PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
+        com.gemstone.gemfire.internal.cache.execute.PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
+        com.gemstone.gemfire.internal.cache.execute.PRClientServerRegionFunctionExecutionSingleHopDUnitTest.class,
+        com.gemstone.gemfire.internal.cache.ha.HASlowReceiverDUnitTest.class};
+    
     return new TestSuite(classes);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
index 598bece..e0e7836 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
@@ -46,10 +46,6 @@ import com.gemstone.gemfire.test.dunit.Wait;
  */
 public class NewWANConcurrencyCheckForDestroyDUnitTest extends WANTestBase {
 
-  //These fields are used as BlackBoard for test data verification.
-  static long destroyTimeStamp;
-  static int destroyingMember;
-  
   public NewWANConcurrencyCheckForDestroyDUnitTest(String name) {
     super(name);
   }
@@ -128,7 +124,7 @@ public class NewWANConcurrencyCheckForDestroyDUnitTest extends WANTestBase
{
     //wait for vm1 to propagate put to vm3 and vm5
     Wait.pause(2000); 
 
-    destroyTimeStamp = (Long) vm3.invoke(() -> NewWANConcurrencyCheckForDestroyDUnitTest.getVersionTimestampAfterOp());
+    long destroyTimeStamp = (Long) vm3.invoke(() -> NewWANConcurrencyCheckForDestroyDUnitTest.getVersionTimestampAfterOp());
     
     //wait for vm1 to propagate destroyed entry's new version tag to vm5
     Wait.pause(2000); 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f593119d/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
index bd24d9a..90dde8c 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
@@ -207,8 +207,7 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
     vm3.invoke(() -> WANTestBase.validateRegionSize(
         getTestMethodName() + "_RR", 0 ));
     
-    fail("tried to invoke missing method");    
-//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener2("ln",
keyValues ));
+    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener2("ln",
keyValues ));
   }
   
   /**
@@ -338,7 +337,7 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
     }
   }
   
-  public static void validateReceivedEventsMapSizeListener2(final String senderId, final
HashMap map) {
+  public static void validateReceivedEventsMapSizeListener2(final String senderId, final
Map map) {
 
     Set<GatewaySender> senders = cache.getGatewaySenders();
     GatewaySender sender = null;


Mime
View raw message