From common-commits-return-83326-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue May 29 18:13:19 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 346C1180677 for ; Tue, 29 May 2018 18:13:19 +0200 (CEST) Received: (qmail 22085 invoked by uid 500); 29 May 2018 16:13:18 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 22057 invoked by uid 99); 29 May 2018 16:13:18 -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; Tue, 29 May 2018 16:13:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7B58BE108C; Tue, 29 May 2018 16:13:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: inigoiri@apache.org To: common-commits@hadoop.apache.org Date: Tue, 29 May 2018 16:13:18 -0000 Message-Id: <5157cff981ed43f4a7e3d4ad230e4f39@git.apache.org> In-Reply-To: <97de6f3d7b6346bcba6f1cd1a8e52cb8@git.apache.org> References: <97de6f3d7b6346bcba6f1cd1a8e52cb8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/5] hadoop git commit: HADOOP-15497. TestTrash should use proper test path to avoid failing on Windows. Contributed by Anbang Hu. HADOOP-15497. TestTrash should use proper test path to avoid failing on Windows. Contributed by Anbang Hu. (cherry picked from commit 3c75f8e4933221fa60a87e86a3db5e4727530b6f) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1dd9670d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1dd9670d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1dd9670d Branch: refs/heads/branch-3.1 Commit: 1dd9670ddd8767f3860c6662d860181aacacf744 Parents: 500b0ee Author: Inigo Goiri Authored: Tue May 29 09:11:08 2018 -0700 Committer: Inigo Goiri Committed: Tue May 29 09:11:38 2018 -0700 ---------------------------------------------------------------------- .../src/test/java/org/apache/hadoop/fs/TestTrash.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/1dd9670d/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java index 12aed29..fa2d21f 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java @@ -49,9 +49,11 @@ import org.apache.hadoop.util.Time; */ public class TestTrash { - private final static Path TEST_DIR = new Path(GenericTestUtils.getTempPath( + private final static File BASE_PATH = new File(GenericTestUtils.getTempPath( "testTrash")); + private final static Path TEST_DIR = new Path(BASE_PATH.getAbsolutePath()); + @Before public void setUp() throws IOException { // ensure each test initiates a FileSystem instance, @@ -682,7 +684,7 @@ public class TestTrash { static class TestLFS extends LocalFileSystem { Path home; TestLFS() { - this(new Path(TEST_DIR, "user/test")); + this(TEST_DIR); } TestLFS(final Path home) { super(new RawLocalFileSystem() { @@ -809,8 +811,8 @@ public class TestTrash { */ public static void verifyTrashPermission(FileSystem fs, Configuration conf) throws IOException { - Path caseRoot = new Path( - GenericTestUtils.getTempPath("testTrashPermission")); + Path caseRoot = new Path(BASE_PATH.getPath(), + "testTrashPermission"); try (FileSystem fileSystem = fs){ Trash trash = new Trash(fileSystem, conf); FileSystemTestWrapper wrapper = --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org