geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [22/48] incubator-geode git commit: GEODE-647: Adding some test debugging output
Date Mon, 14 Dec 2015 18:06:55 GMT
GEODE-647: Adding some test debugging output


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

Branch: refs/heads/feature/GEODE-217
Commit: 9d047b4df4af8d60161cab95fc9a1af5e6d956ae
Parents: a84780e
Author: Jens Deppe <jdeppe@pivotal.io>
Authored: Fri Dec 11 08:31:51 2015 -0800
Committer: Jens Deppe <jdeppe@pivotal.io>
Committed: Fri Dec 11 08:32:41 2015 -0800

----------------------------------------------------------------------
 .../management/internal/cli/GfshParserJUnitTest.java   | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9d047b4d/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
index 68fe251..c536147 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
@@ -150,8 +150,11 @@ public class GfshParserJUnitTest {
    */
   @Test
   public void testComplete() throws Exception {
+    StringBuilder debugger = new StringBuilder();
+
     // get a CommandManager, add sample commands
     CommandManager commandManager = CommandManager.getInstance(false);
+    debugger.append("cm1:").append(String.format("0x%x", commandManager.hashCode()));
     assertNotNull("CommandManager should not be null.", commandManager);
     commandManager.add(Commands.class.newInstance());
     commandManager.add(SimpleConverter.class.newInstance());
@@ -167,6 +170,16 @@ public class GfshParserJUnitTest {
     List<String> completionCandidates = new ArrayList<String>();
     List<String> completionValues = new ArrayList<String>();
     parser.complete(input, input.length(), completionCandidates);
+    debugger.append(" cm2:").append(String.format("0x%x", CommandManager.getExisting().hashCode()));
+    if (completionValues.size() != completionCandidates.size()) {
+      if (completionCandidates.size() > 0) {
+        for (String s : completionCandidates) {
+          debugger.append(" ").append(s);
+        }
+      }
+      assertEquals(debugger.toString(), completionValues.size(), completionCandidates.size());
+    }
+
     assertSimpleCompletionValues(completionValues, completionCandidates);
 
     // Input contains a string which is prefix


Mime
View raw message