geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [geode] branch feature/GEODE-4695 updated: GEODE-4695 PluckStacks utility is confused by Attach Listener thread dump
Date Tue, 20 Feb 2018 17:10:46 GMT
This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch feature/GEODE-4695
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-4695 by this push:
     new b3436e2  GEODE-4695 PluckStacks utility is confused by Attach Listener thread dump
b3436e2 is described below

commit b3436e20ae67dd5fcf04a11e9d5ba10bdfeeb2e3
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
AuthorDate: Tue Feb 20 09:03:29 2018 -0800

    GEODE-4695 PluckStacks utility is confused by Attach Listener thread dump
    
    fixing failure in new test.
---
 .../apache/geode/internal/util/PluckStacksDUnitTest.java    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/geode-core/src/test/java/org/apache/geode/internal/util/PluckStacksDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/util/PluckStacksDUnitTest.java
index 1a8cc9d..b0507fd 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/util/PluckStacksDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/util/PluckStacksDUnitTest.java
@@ -29,12 +29,14 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.execute.ResultCollector;
+import org.apache.geode.distributed.ConfigurationProperties;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.internal.ClassPathLoader;
@@ -51,6 +53,14 @@ import org.apache.geode.util.test.TestUtil;
 @Category(DistributedTest.class)
 public class PluckStacksDUnitTest extends JUnit4CacheTestCase {
 
+  @Override
+  public Properties getDistributedSystemProperties() {
+    Properties properties = super.getDistributedSystemProperties();
+    properties.put(ConfigurationProperties.NAME,
+        "vm " + Integer.getInteger("gemfire.DUnitLauncher.VM_NUM", -1));
+    return properties;
+  }
+
 
   /**
    * Gfsh has an "export stack-traces" command that PluckStacks should be able to parse
@@ -70,6 +80,7 @@ public class PluckStacksDUnitTest extends JUnit4CacheTestCase {
     DistributedSystem system = getSystem();
 
     Set<DistributedMember> targetMembers = system.getAllOtherMembers();
+    assertEquals("expected 3 members but found " + targetMembers, 3, targetMembers.size());
 
     String outputFileName = "PluckStacksdUnitTest.out";
     File outputFile = new File(outputFileName);
@@ -77,6 +88,7 @@ public class PluckStacksDUnitTest extends JUnit4CacheTestCase {
       outputFile.delete();
     }
 
+    System.out.println("dumping stacks for " + targetMembers);
     dumpStacksToFile(targetMembers, outputFileName);
     assertTrue(outputFile.exists());
     assertNotEquals(0, outputFile.length());
@@ -125,6 +137,7 @@ public class PluckStacksDUnitTest extends JUnit4CacheTestCase {
         fail("expected a stack trace but found " + resultObj);
       }
     }
+    assertEquals(targetMembers.size(), dumps.size());
 
     new ExportStackTraceCommand().writeStacksToFile(dumps, fileName);
   }

-- 
To stop receiving notification emails like this one, please contact
bschuchardt@apache.org.

Mime
View raw message