Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4A187200AC0 for ; Tue, 10 May 2016 00:44:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 48B3C160A18; Mon, 9 May 2016 22:44:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 82BFB160A0F for ; Tue, 10 May 2016 00:44:28 +0200 (CEST) Received: (qmail 73376 invoked by uid 500); 9 May 2016 22:44:27 -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 73294 invoked by uid 99); 9 May 2016 22:44:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 22:44:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7FE46DFD4C; Mon, 9 May 2016 22:44:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Mon, 09 May 2016 22:44:28 -0000 Message-Id: In-Reply-To: <57cd55ca2e5a4233af3a05ecca0d6336@git.apache.org> References: <57cd55ca2e5a4233af3a05ecca0d6336@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] accumulo git commit: ACCUMULO-4305 Fix ShellUtilTest archived-at: Mon, 09 May 2016 22:44:29 -0000 ACCUMULO-4305 Fix ShellUtilTest Fix ShellUtilTest base64 decoding test Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/04d0c19b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/04d0c19b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/04d0c19b Branch: refs/heads/1.8 Commit: 04d0c19bb9d035128564beaec2cf60585aa3eab1 Parents: 160e2c7 Author: Christopher Tubbs Authored: Mon May 9 18:09:24 2016 -0400 Committer: Christopher Tubbs Committed: Mon May 9 18:09:24 2016 -0400 ---------------------------------------------------------------------- .../src/test/java/org/apache/accumulo/shell/ShellUtilTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/04d0c19b/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java ---------------------------------------------------------------------- diff --git a/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java b/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java index 9b3be51..28e56ab 100644 --- a/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java +++ b/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java @@ -40,6 +40,7 @@ public class ShellUtilTest { // String with 3 lines, with one empty line private static final String FILEDATA = "line1\n\nline2"; + private static final String B64_FILEDATA = Base64.encodeBase64String("line1".getBytes(UTF_8)) + "\n\n" + Base64.encodeBase64String("line2".getBytes(UTF_8)); @Test public void testWithoutDecode() throws IOException { @@ -52,9 +53,9 @@ public class ShellUtilTest { @Test public void testWithDecode() throws IOException { File testFile = new File(folder.getRoot(), "testFileWithDecode.txt"); - FileUtils.writeStringToFile(testFile, FILEDATA); + FileUtils.writeStringToFile(testFile, B64_FILEDATA); List output = ShellUtil.scanFile(testFile.getAbsolutePath(), true); - assertEquals(ImmutableList.of(new Text(Base64.decodeBase64("line1".getBytes(UTF_8))), new Text(Base64.decodeBase64("line2".getBytes(UTF_8)))), output); + assertEquals(ImmutableList.of(new Text("line1"), new Text("line2")), output); } @Test(expected = FileNotFoundException.class)