From 091f42fefa35e5d75f9e5608fb964c719e4e5590 Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Mon, 14 Apr 2014 04:09:12 +0000 Subject: [PATCH] HADOOP-10495. TestFileUtil fails on Windows due to bad permission assertions. Contributed by Chris Nauroth. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1587137 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/test/java/org/apache/hadoop/fs/TestFileUtil.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index d9801be5c7..7058e010a7 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -380,6 +380,9 @@ Release 2.5.0 - UNRELEASED HADOOP-10350. BUILDING.txt should mention openssl dependency required for hadoop-pipes (Vinayakumar B) + HADOOP-10495. TestFileUtil fails on Windows due to bad permission + assertions. (cnauroth) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java index 3eaa97f247..2234f2f453 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java @@ -589,7 +589,7 @@ public void testGetDU() throws Exception { // should never happen since that method never throws InterruptedException. assertNull(ie); } - assertFalse(notADirectory.canRead()); + assertFalse(FileUtil.canRead(notADirectory)); final long du3 = FileUtil.getDU(partitioned); assertEquals(expected, du3); @@ -600,7 +600,7 @@ public void testGetDU() throws Exception { // should never happen since that method never throws InterruptedException. assertNull(ie); } - assertFalse(partitioned.canRead()); + assertFalse(FileUtil.canRead(partitioned)); final long du4 = FileUtil.getDU(partitioned); assertEquals(0, du4); } finally {