geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [09/35] incubator-geode git commit: GEODE-452. We were checking cacheClientProxy after closing it. but sometimes client was reconnecting and queue again. Now we check after closing the client cache.
Date Tue, 03 Nov 2015 19:38:41 GMT
GEODE-452. We were checking cacheClientProxy after closing it. but
sometimes client was reconnecting and queue again. Now we check after
closing the client cache.


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

Branch: refs/heads/develop
Commit: 9d0f9c5dc296761bec53ed0bca8fc3f0881c22ef
Parents: d08e51d
Author: Hitesh Khamesra <hkhamesra@pivotal.io>
Authored: Tue Oct 27 10:20:25 2015 -0700
Committer: Hitesh Khamesra <hkhamesra@pivotal.io>
Committed: Tue Oct 27 10:22:06 2015 -0700

----------------------------------------------------------------------
 .../cache/tier/sockets/Bug37210DUnitTest.java   | 22 +++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9d0f9c5d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
index b3e2889..0545cd7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
@@ -151,8 +151,12 @@ public class Bug37210DUnitTest extends DistributedTestCase
     client.invoke(Bug37210DUnitTest.class, "createClientCache",
         new Object[] { getServerHostName(Host.getHost(0)), new Integer(PORT) });
     server.invoke(Bug37210DUnitTest.class, "doEntryOperations");
+    
     server.invoke(Bug37210DUnitTest.class,
         "closeCacheClientProxyAndVerifyStats");
+    client.invoke(Bug37210DUnitTest.class, "closeCache");
+    server.invoke(Bug37210DUnitTest.class,
+            "closeCacheClientProxyAndVerifyStats2");
     getLogWriter().info("testHAStatsCleanup : END");
   }
 
@@ -242,17 +246,21 @@ public class Bug37210DUnitTest extends DistributedTestCase
         .getClientProxies().iterator();
     assertTrue("No proxy found",proxies.hasNext());
     CacheClientProxy proxy = (CacheClientProxy)proxies.next();
-    
-    proxy.close();
-
-    HARegionQueue rq = proxy.getHARegionQueue();
     Map dispatchedMsgMap = HARegionQueue.getDispatchedMessagesMapForTesting();
+    HARegionQueue rq = proxy.getHARegionQueue();
+    Object value = dispatchedMsgMap.get(rq.getRegion().getName());
+    proxy.close();
 
     assertTrue("HARegionQueue stats were not closed on proxy.close()", rq
         .getStatistics().isClosed());
-    assertFalse(
-        "HARegionQueue.dispatchedMessagesMap contains entry for the region even after proxy.close()",
-        dispatchedMsgMap.containsKey(rq.getRegion().getName()));
+    
+  }
+  
+  public static void closeCacheClientProxyAndVerifyStats2() {
+	  Map dispatchedMsgMap = HARegionQueue.getDispatchedMessagesMapForTesting();
+	  assertTrue(
+		        "HARegionQueue.dispatchedMessagesMap contains entry for the region even after proxy.close()",
+		        dispatchedMsgMap.size() == 0);  
   }
 
   /**


Mime
View raw message