Explorar el Código

HADOOP-10109. Fix test failure in TestOfflineEditsViewer introduced by HADOOP-10052 (cmccabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.2@1543125 13f79535-47bb-0310-9956-ffa450edef68
Colin McCabe hace 11 años
padre
commit
b9bc9f47fe

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -101,6 +101,9 @@ Release 2.2.1 - UNRELEASED
     HDFS-5372. In FSNamesystem, hasReadLock() returns false if the current 
     thread holds the write lock (Vinaykumar B via umamahesh)
 
+    HADOOP-10109.  Fix test failure in TestOfflineEditsViewer introduced by
+    HADOOP-10052 (cmccabe)
+
 Release 2.2.0 - 2013-10-13
 
   INCOMPATIBLE CHANGES

+ 6 - 0
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java

@@ -35,12 +35,18 @@ import org.apache.hadoop.hdfs.DFSTestUtil;
 import org.apache.hadoop.hdfs.server.namenode.FSEditLogOpCodes;
 import org.apache.hadoop.hdfs.server.namenode.OfflineEditsViewerHelper;
 import org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsViewer.Flags;
+import org.apache.hadoop.fs.FileSystem;
 import org.junit.Before;
 import org.junit.Test;
 
 public class TestOfflineEditsViewer {
   private static final Log LOG = LogFactory.getLog(TestOfflineEditsViewer.class);
 
+  // Re-enable symlinks for tests, see HADOOP-10020 and HADOOP-10052
+  static {
+    FileSystem.enableSymlinks();
+  }
+
   private static final Map<FSEditLogOpCodes, Boolean> obsoleteOpCodes =
     new HashMap<FSEditLogOpCodes, Boolean>();