From commits-return-23370-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Fri Aug 16 19:48:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 19E6318057A for ; Fri, 16 Aug 2019 21:48:04 +0200 (CEST) Received: (qmail 25266 invoked by uid 500); 16 Aug 2019 19:48:03 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 25249 invoked by uid 99); 16 Aug 2019 19:48:03 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2019 19:48:03 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 2884285F56; Fri, 16 Aug 2019 19:48:03 +0000 (UTC) Date: Fri, 16 Aug 2019 19:48:03 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch 1.9 updated: Clean up importDirectory IT (remove unneeded method) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <156598488303.14576.6468155798535930567@gitbox.apache.org> From: ctubbsii@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/1.9 X-Git-Reftype: branch X-Git-Oldrev: 19bdeb4d908b5eece1ebccb6be1295e8cf0759de X-Git-Newrev: c0b94a2f59e0aeb34376e0c9e2a6113ffc26435e X-Git-Rev: c0b94a2f59e0aeb34376e0c9e2a6113ffc26435e X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 1.9 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/1.9 by this push: new c0b94a2 Clean up importDirectory IT (remove unneeded method) c0b94a2 is described below commit c0b94a2f59e0aeb34376e0c9e2a6113ffc26435e Author: Christopher Tubbs AuthorDate: Fri Aug 16 15:09:55 2019 -0400 Clean up importDirectory IT (remove unneeded method) --- .../org/apache/accumulo/test/ShellServerIT.java | 30 +++++----------------- 1 file changed, 7 insertions(+), 23 deletions(-) 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 9b377fb..beea4b8 100644 --- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java +++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java @@ -1899,7 +1899,7 @@ public class ShellServerIT extends SharedMiniClusterBase { } /** - * Validate importdirectory command accepts addinig -t tablename option or the accepts original + * Validate importdirectory command accepts adding -t tablename option or the accepts original * format that uses the current working table. Currently this test does not validate the actual * import - only the command syntax. * @@ -1916,11 +1916,10 @@ public class ShellServerIT extends SharedMiniClusterBase { assertTrue(errorsDir.mkdir()); // expect fail - table does not exist. - ts.exec(String.format("importdirectory -t %s %s %s false", table, importDir, errorsDir), false); - assertTrue(checkErrorMsg("TableNotFoundException", ts.output.get().split("\n"))); + ts.exec(String.format("importdirectory -t %s %s %s false", table, importDir, errorsDir), false, + "TableNotFoundException"); - ts.exec(String.format("table %s", table), false); - assertTrue(checkErrorMsg("TableNotFoundException", ts.output.get().split("\n"))); + ts.exec(String.format("table %s", table), false, "TableNotFoundException"); ts.exec("createtable " + table, true); @@ -1932,27 +1931,12 @@ public class ShellServerIT extends SharedMiniClusterBase { ts.exec(String.format("importdirectory %s %s false", importDir, errorsDir), true); // expect fail - invalid command, - ts.exec(String.format("importdirectory false"), false); - assertTrue(checkErrorMsg("Expected 3 arguments. There was 1.", ts.output.get().split("\n"))); + ts.exec("importdirectory false", false, "Expected 3 arguments. There was 1."); // expect fail - original cmd without a table. ts.exec("notable", true); - ts.exec(String.format("importdirectory %s %s false", importDir, errorsDir), false); - - assertTrue(checkErrorMsg("java.lang.IllegalStateException: Not in a table context.", - ts.output.get().split("\n"))); - } - - private boolean checkErrorMsg(final String expectedText, final String[] lines) { - boolean foundText = false; - - for (String line : lines) { - if (line.contains(expectedText)) { - foundText = true; - } - log.trace("shell output>: \'{}\'", line); - } - return foundText; + ts.exec(String.format("importdirectory %s %s false", importDir, errorsDir), false, + "java.lang.IllegalStateException: Not in a table context."); } private static final String FAKE_CONTEXT = "FAKE";