geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [09/54] [abbrv] incubator-geode git commit: GEODE-1031 Added some test related logging.
Date Mon, 21 Mar 2016 20:39:40 GMT
GEODE-1031 Added some test related logging.


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

Branch: refs/heads/feature/GEODE-17-2
Commit: dc9e28a5fe1f9bdb7c70a831f657c3c0e159b146
Parents: 6c069d2
Author: Hitesh Khamesra <hkhamesra@pivotal.io>
Authored: Fri Mar 11 17:16:31 2016 -0800
Committer: Hitesh Khamesra <hkhamesra@pivotal.io>
Committed: Fri Mar 11 17:20:41 2016 -0800

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/CacheClientProxy.java       | 8 +++++++-
 .../internal/cache/tier/sockets/DurableClientTestCase.java  | 9 +++++----
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc9e28a5/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
index f650fee..6edb570 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
@@ -98,6 +98,7 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.command.Get70;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
@@ -139,7 +140,7 @@ public class CacheClientProxy implements ClientSession {
   /**
    * Concurrency: protected by synchronization of {@link #isMarkedForRemovalLock}
    */
-  protected boolean isMarkedForRemoval = false;
+  protected volatile boolean isMarkedForRemoval = false;
   
   /**
    * @see #isMarkedForRemoval
@@ -1880,6 +1881,11 @@ public class CacheClientProxy implements ClientSession {
       .append("; connected=").append(isConnected())
       .append("; isMarkedForRemoval=").append(isMarkedForRemoval)
       .append("]");
+    
+    if(_messageDispatcher != null && isAlive()) {
+     buffer.append( LogWriterImpl.getStackTrace(_messageDispatcher));
+    }
+      
     return buffer.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc9e28a5/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index 1fc2e9f..1a37fbb 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -118,7 +118,7 @@ public class DurableClientTestCase extends DistributedTestCase {
   
   protected void preTearDownDurableClientTestCase() throws Exception {
   }
-
+  
   /**
    * Test that starting a durable client is correctly processed by the server.
    */
@@ -264,9 +264,10 @@ public class DurableClientTestCase extends DistributedTestCase {
     server1VM.invoke(s);
   }
   
-  private String printMap(Map m) {
+  private static String printMap(Map m) {
     Iterator<Map.Entry> itr = m.entrySet().iterator();
     StringBuffer sb = new StringBuffer();
+    sb.append("size = ").append(m.size()).append(" ");
     while(itr.hasNext()){
       sb.append("{");
       Map.Entry entry = itr.next();
@@ -278,7 +279,7 @@ public class DurableClientTestCase extends DistributedTestCase {
     return sb.toString();    
   }
   
-  private void printMapValue(Object value, StringBuffer sb) {
+  private static void printMapValue(Object value, StringBuffer sb) {
     if(value.getClass().isArray()) {
       
       sb.append("{");
@@ -1648,7 +1649,7 @@ public class DurableClientTestCase extends DistributedTestCase {
         
         if(ccp != null)
           result += " ccp: " + ccp.toString();*/
-        return getAllClientProxyState();
+        return getAllClientProxyState() + " CHM state: " + printMap(ClientHealthMonitor._instance.getConnectedClients(null));
       }
     };
     Wait.waitForCriterion(ev, 50 * 1000, 200, true);


Mime
View raw message