geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [53/63] [abbrv] incubator-geode git commit: Commenting out broken code that is now a compile error
Date Fri, 19 Feb 2016 18:37:30 GMT
Commenting out broken code that is now a compile error

These are places where the code invoke was calling a method that doesn't
exist. These tests were either not running, or in some cases never
checking the return value of an invokeAsync call.


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

Branch: refs/heads/develop
Commit: ce74e9779d7ac5cc61545d76f4e994742ec6e093
Parents: 493d41b
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Wed Feb 10 16:19:01 2016 -0800
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Tue Feb 16 14:08:40 2016 -0800

----------------------------------------------------------------------
 .../disttx/DistributedTransactionDUnitTest.java |  3 ++-
 .../cache/partitioned/Bug51400DUnitTest.java    |  4 +++-
 .../CacheServerTransactionsDUnitTest.java       | 10 +++++----
 .../sockets/InterestListRecoveryDUnitTest.java  |  4 +++-
 .../asyncqueue/AsyncEventListenerDUnitTest.java |  5 +++--
 .../tier/sockets/DurableClientTestCase.java     |  6 ++++--
 .../gemfire/internal/cache/wan/WANTestBase.java |  7 +++----
 ...rialGatewaySenderEventListenerDUnitTest.java | 22 +++++++++++++-------
 8 files changed, 38 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
index 873baa7..ab8fad4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
@@ -1794,7 +1794,8 @@ public class DistributedTransactionDUnitTest extends CacheTestCase {
         return null;
       }
     }
-    server1.invokeAsync(() -> Ops.call());
+     
+    server1.invokeAsync(() -> new Ops().call());
     
     // Now create cache on the third server and let it join the distributed system.
     createPR(new VM[]{server3});

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
index 1715674..c7fffe4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
@@ -174,7 +174,9 @@ public class Bug51400DUnitTest extends DistributedTestCase {
     // Set infinite ack interval so that the queue will not be drained.
     int ackInterval = Integer.MAX_VALUE;
 
-    int port1 = (Integer) server0.invoke(() -> Bug51400DUnitTest.createServerCache( maxQSize
));
+    fail("Invoking bad method");
+    int port1 = 0;
+//    int port1 = (Integer) server0.invoke(() -> Bug51400DUnitTest.createServerCache(
maxQSize));
 
     client1.invoke(Bug51400DUnitTest.class, "createClientCache",
         new Object[] { NetworkUtils.getServerHostName(Host.getHost(0)), new Integer[]{port1},
ackInterval});

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
index bdc96a7..d4daa39 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
@@ -373,10 +373,12 @@ public class CacheServerTransactionsDUnitTest extends DistributedTestCase
    *
    */
   public void YOGESH_testClientToServerCommits(){
-    Integer port1 = ((Integer)server1.invoke(() -> CacheServerTransactionsDUnitTest.createServerCache()));
-    Integer port2 = ((Integer)server2.invoke(() -> CacheServerTransactionsDUnitTest.createServerCache()));
-    client1.invoke(() -> CacheServerTransactionsDUnitTest.createClientCache( NetworkUtils.getServerHostName(server1.getHost()),
port1 ));
-    client2.invoke(() -> CacheServerTransactionsDUnitTest.createClientCache( NetworkUtils.getServerHostName(server1.getHost()),
port2 ));
+    fail("Invoking bad method");
+    int port1 = 0;
+//    Integer port1 = ((Integer)server1.invoke(() -> CacheServerTransactionsDUnitTest.createServerCache()));
+//    Integer port2 = ((Integer)server2.invoke(() -> CacheServerTransactionsDUnitTest.createServerCache()));
+//    client1.invoke(() -> CacheServerTransactionsDUnitTest.createClientCache( NetworkUtils.getServerHostName(server1.getHost()),
port1 ));
+//    client2.invoke(() -> CacheServerTransactionsDUnitTest.createClientCache( NetworkUtils.getServerHostName(server1.getHost()),
port2 ));
     client1.invoke(() -> CacheServerTransactionsDUnitTest.commitTransactionOnClient());
     Wait.pause(PAUSE);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
index 8beb5a0..0f25d01 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
@@ -119,7 +119,9 @@ public class InterestListRecoveryDUnitTest extends DistributedTestCase
     Wait.pause(20000);
     setServerUnavailable("localhost"+PORT2);
     Wait.pause(20000);
-    server1.invoke(() -> InterestListRecoveryDUnitTest.verifyUnregisterK1toK3());
+    fail("invoking bad method");
+    //This method doesn't exist
+//    server1.invoke(() -> InterestListRecoveryDUnitTest.verifyUnregisterK1toK3());
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index 25f0ff3..f5ed32b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@ -610,8 +610,9 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
         500 ));
     vm4.invokeAsync(() -> AsyncEventQueueTestBase.doNextPuts( getTestMethodName() + "_RR",
       500, 1000 ));
-    vm4.invokeAsync(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_RR",
-      1000, 1500 ));
+    //Async invocation which was bound to fail
+//    vm4.invokeAsync(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_RR",
+//      1000, 1500 ));
     
     vm4.invoke(() -> AsyncEventQueueTestBase.validateAsyncEventListener("ln", 1000 ));//
primary sender
     vm5.invoke(() -> AsyncEventQueueTestBase.validateAsyncEventListener("ln", 0 ));//
secondary

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
b/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index 3be13ec..1fc2e9f 100755
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -1272,8 +1272,10 @@ public class DurableClientTestCase extends DistributedTestCase {
     final int mcastPort = ports[1].intValue();
     
     // Start server 2 using the same mcast port as server 1
-    final int server2Port = ((Integer) this.server2VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true), new Integer(mcastPort))))
-        .intValue();
+    fail("Trying to get a result from a void method");
+    final int server2Port=0;
+//    final int server2Port = ((Integer) this.server2VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true), new Integer(mcastPort))))
+//        .intValue();
     
     // Start a durable client
     final String durableClientId = getName() + "_client";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 374d929..272c79c 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -85,6 +85,7 @@ import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.ServerLocation;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.FileUtil;
@@ -114,10 +115,10 @@ import com.gemstone.gemfire.internal.cache.wan.parallel.ParallelGatewaySenderQue
 import com.gemstone.gemfire.pdx.SimpleClass;
 import com.gemstone.gemfire.pdx.SimpleClass1;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
@@ -1518,7 +1519,6 @@ public class WANTestBase extends DistributedTestCase{
     //q.start();
   }
   
-  /*
   public static Map getSenderToReceiverConnectionInfo(String senderId){	
 	  Set<GatewaySender> senders = cache.getGatewaySenders();
 	  GatewaySender sender = null;
@@ -1535,7 +1535,7 @@ public class WANTestBase extends DistributedTestCase{
 			  ((AbstractGatewaySender)sender).getEventProcessor().getDispatcher();
 		  if (dispatcher instanceof GatewaySenderEventRemoteDispatcher) {
 			  ServerLocation serverLocation = 
-				  ((GatewaySenderEventRemoteDispatcher) dispatcher).getConnection().getServer();
+				  ((GatewaySenderEventRemoteDispatcher) dispatcher).getConnection(false).getServer();
 			  connectionInfo.put("serverHost", serverLocation.getHostName());
 			  connectionInfo.put("serverPort", serverLocation.getPort());
 			  
@@ -1543,7 +1543,6 @@ public class WANTestBase extends DistributedTestCase{
 	  }
 	  return connectionInfo;
   }
-  */
   public static List<Integer> getSenderStats(String senderId, final int expectedQueueSize){
     Set<GatewaySender> senders = cache.getGatewaySenders();
     AbstractGatewaySender sender = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce74e977/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 113eb84..a0a57ba 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
@@ -91,8 +91,9 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
     
     vm4.invoke(() -> WANTestBase.printEventListenerMap());
     vm5.invoke(() -> WANTestBase.printEventListenerMap());
-    
-    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
keyValues ));
+
+    fail("tried to invoke missing method");
+//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
keyValues ));
   }
   
   /**
@@ -150,8 +151,9 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
         getTestMethodName() + "_RR", 0 ));
     vm3.invoke(() -> WANTestBase.validateRegionSize(
         getTestMethodName() + "_RR", 0 ));
-    
-    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
keyValues ));
+
+    fail("tried to invoke missing method");
+//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
keyValues ));
   }
 
   /**
@@ -206,7 +208,8 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
     vm3.invoke(() -> WANTestBase.validateRegionSize(
         getTestMethodName() + "_RR", 0 ));
     
-    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener2("ln",
keyValues ));
+    fail("tried to invoke missing method");    
+//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener2("ln",
keyValues ));
   }
   
   /**
@@ -260,7 +263,8 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
     vm4.invoke(() -> WANTestBase.putGivenKeyValue( getTestMethodName() + "_RR",
       initialKeyValues ));
 
-    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
initialKeyValues ));
+    fail("tried to invoke missing method");
+//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
initialKeyValues ));
     
     vm4.invoke(() -> WANTestBase.stopSender( "ln" ));
     
@@ -272,7 +276,8 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
     vm4.invoke(() -> WANTestBase.putGivenKeyValue( getTestMethodName() + "_RR",
       keyValues ));
     
-    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
initialKeyValues ));
+    fail("tried to invoke missing method");
+//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
initialKeyValues ));
 
     vm4.invoke(() -> WANTestBase.startSender( "ln" ));
 
@@ -285,7 +290,8 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase
{
       finalKeyValues ));
     
     finalKeyValues.putAll(initialKeyValues);
-    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
finalKeyValues ));
+    fail("tried to invoke missing method");
+//    vm4.invoke(() -> SerialGatewaySenderEventListenerDUnitTest.validateReceivedEventsMapSizeListener1("ln",
finalKeyValues ));
     
   }
     


Mime
View raw message