Explorar o código

HADOOP-10162. Fix symlink-related test failures in TestFileContextResolveAfs and TestStat in branch-2 (Mit Desai via Colin Patrick McCabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1550487 13f79535-47bb-0310-9956-ffa450edef68
Colin McCabe %!s(int64=11) %!d(string=hai) anos
pai
achega
f7e842683d

+ 4 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -174,6 +174,10 @@ Release 2.4.0 - UNRELEASED
     HADOOP-10058. TestMetricsSystemImpl#testInitFirstVerifyStopInvokedImmediately
     fails on trunk (Chen He via jeagles)
 
+    HADOOP-10162. Fix symlink-related test failures in
+    TestFileContextResolveAfs and TestStat in branch-2 (Mit Desai via Colin
+    Patrick McCabe)
+
 Release 2.3.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 3 - 1
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileContextResolveAfs.java

@@ -31,7 +31,9 @@ import org.junit.Test;
  * Tests resolution of AbstractFileSystems for a given path with symlinks.
  */
 public class TestFileContextResolveAfs {
-  
+  static{
+    FileSystem.enableSymlinks();
+  }
   private static String TEST_ROOT_DIR_LOCAL
     = System.getProperty("test.build.data","/tmp");
   

+ 3 - 1
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestStat.java

@@ -32,7 +32,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class TestStat extends FileSystemTestHelper {
-
+  static{
+    FileSystem.enableSymlinks();
+  }
   private static Stat stat;
 
   @BeforeClass