瀏覽代碼

HDFS-7946. TestDataNodeVolumeFailureReporting NPE on Windows. (Contributed by Xiaoyu Yao)

Arpit Agarwal 10 年之前
父節點
當前提交
7d0f84bd8d

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

@@ -866,6 +866,9 @@ Release 2.7.0 - UNRELEASED
 
     HDFS-7886. Fix TestFileTruncate falures. (Plamen Jeliazkov and shv)
 
+    HDFS-7946. TestDataNodeVolumeFailureReporting NPE on Windows. (Xiaoyu Yao
+    via Arpit Agarwal)
+
     BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
 
       HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

+ 4 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureReporting.java

@@ -91,6 +91,7 @@ public class TestDataNodeVolumeFailureReporting {
     // been simulated by denying execute access.  This is based on the maximum
     // number of datanodes and the maximum number of storages per data node used
     // throughout the tests in this suite.
+    assumeTrue(!Path.WINDOWS);
     int maxDataNodes = 3;
     int maxStoragesPerDataNode = 4;
     for (int i = 0; i < maxDataNodes; i++) {
@@ -100,7 +101,9 @@ public class TestDataNodeVolumeFailureReporting {
       }
     }
     IOUtils.cleanup(LOG, fs);
-    cluster.shutdown();
+    if (cluster != null) {
+      cluster.shutdown();
+    }
   }
 
   /**