diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 388f359107b..5b3ebc3a87b 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -965,6 +965,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12584. Disable browsing the static directory in HttpServer2. (Robert Kanter via aajisaka) + HADOOP-12603. TestSymlinkLocalFSFileContext#testSetTimesSymlinkToDir + occasionally fail. (Wei-Chiu Chuang via cnauroth) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java index 9d66732b4ec..007c37aa41e 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java @@ -1388,7 +1388,8 @@ public abstract class SymlinkBaseTest { long at = wrapper.getFileLinkStatus(link).getAccessTime(); // the local file system may not support millisecond timestamps wrapper.setTimes(link, 2000L, 3000L); - assertEquals(at, wrapper.getFileLinkStatus(link).getAccessTime()); + assertTrue("The atime of symlink should not be lesser after setTimes()", + wrapper.getFileLinkStatus(link).getAccessTime() >= at); assertEquals(2000, wrapper.getFileStatus(dir).getModificationTime()); assertEquals(3000, wrapper.getFileStatus(dir).getAccessTime()); } diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestSymlinkLocalFS.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestSymlinkLocalFS.java index ab55f003ae4..8968e7ad167 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestSymlinkLocalFS.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestSymlinkLocalFS.java @@ -223,13 +223,13 @@ abstract public class TestSymlinkLocalFS extends SymlinkBaseTest { @Override public void testSetTimesSymlinkToFile() throws IOException { - assumeTrue(!Path.WINDOWS); + assumeTrue(!Shell.WINDOWS && !Shell.SOLARIS); super.testSetTimesSymlinkToFile(); } @Override public void testSetTimesSymlinkToDir() throws IOException { - assumeTrue(!Path.WINDOWS); + assumeTrue(!Path.WINDOWS && !Shell.SOLARIS); super.testSetTimesSymlinkToDir(); }