Repository: accumulo Updated Branches: refs/heads/1.5.2-SNAPSHOT 19231a25c -> 43cebf8c0 refs/heads/1.6.0-SNAPSHOT fc4de9022 -> 3ed0bbd65 refs/heads/master 27abe8352 -> f4b37443c
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.5.2-SNAPSHOT Commit: 43cebf8c0389ce178fc02c7a541671d335e8e45e Parents: 19231a2 Author: Josh Elser <els...@apache.org> Authored: Tue Mar 11 14:50:11 2014 -0400 Committer: Josh Elser <els...@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();