accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/8] git commit: ACCUMULO-2433 It would help to actually pass the error message to the assertion
Date Tue, 11 Mar 2014 18:57:58 GMT
ACCUMULO-2433 It would help to actually pass the error message to the assertion


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/43cebf8c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/43cebf8c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/43cebf8c

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 43cebf8c0389ce178fc02c7a541671d335e8e45e
Parents: 19231a2
Author: Josh Elser <elserj@apache.org>
Authored: Tue Mar 11 14:50:11 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Mar 11 14:50:11 2014 -0400

----------------------------------------------------------------------
 .../test/java/org/apache/accumulo/test/ShellServerTest.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/43cebf8c/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java b/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
index d66f509..caa3dd1 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
@@ -158,7 +158,7 @@ public class ShellServerTest {
     Shell.log.debug(output.get());
     if (0 != shell.getExitCode()) {
       String errorMsg = callback.getErrorMessage();
-      assertEquals(0, shell.getExitCode());
+      assertEquals(errorMsg, 0, shell.getExitCode());
     }
 
     if (s.length() > 0)
@@ -167,7 +167,11 @@ public class ShellServerTest {
 
   void assertBadExit(String s, boolean stringPresent, ErrorMessageCallback callback) {
     Shell.log.debug(output.get());
-    assertTrue(shell.getExitCode() > 0);
+    if (0 == shell.getExitCode()) {
+      String errorMsg = callback.getErrorMessage();
+      assertTrue(errorMsg, shell.getExitCode() > 0);
+    }
+
     if (s.length() > 0)
       assertEquals(s + " present in " + output.get() + " was not " + stringPresent, stringPresent,
output.get().contains(s));
     shell.resetExitCode();


Mime
View raw message