You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/03/12 06:12:20 UTC
[06/14] git commit: ACCUMULO-2433 It would help to actually pass the
error message to the assertion
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/ACCUMULO-2061
Commit: 43cebf8c0389ce178fc02c7a541671d335e8e45e
Parents: 19231a2
Author: Josh Elser <el...@apache.org>
Authored: Tue Mar 11 14:50:11 2014 -0400
Committer: Josh Elser <el...@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();