This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 2.0 in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 7a834455f713152e97d99a4081f4f192b31326ac Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Fri Aug 16 15:34:08 2019 -0400 Fix ShellServerIT and importdirectory exit code * Update ShellServerIT to handle correct expected message * Ensure importdirectory shell command returns proper exit code on error --- .../java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java | 1 + test/src/main/java/org/apache/accumulo/test/ShellServerIT.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java index 5decaed..12f55f5 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java @@ -68,6 +68,7 @@ public class ImportDirectoryCommand extends Command { new IllegalArgumentException(String.format("Expected 2 or 3 arguments. There %s %d.", args.length == 1 ? "was" : "were", args.length))); printHelp(shellState); + return 1; } return 0; diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java index 176038b..c8e5de5 100644 --- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java +++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java @@ -1959,7 +1959,7 @@ public class ShellServerIT extends SharedMiniClusterBase { ts.exec(String.format("importdirectory %s %s false", importDir, errorsDir), true); // expect fail - invalid command, - ts.exec("importdirectory false", false, "Expected 3 arguments. There was 1."); + ts.exec("importdirectory false", false, "Expected 2 or 3 arguments. There was 1."); // expect fail - original cmd without a table. ts.exec("notable", true);