Przeglądaj źródła

HDFS-5559. Fix TestDatanodeConfig in HDFS-2832. (Contributed by szetszwo)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-2832@1544891 13f79535-47bb-0310-9956-ffa450edef68
Arpit Agarwal 11 lat temu
rodzic
commit
81211123d8

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-2832.txt

@@ -118,3 +118,5 @@ IMPROVEMENTS:
     HDFS-5542. Fix TODO and clean up the code in HDFS-2832. (Contributed by
     szetszwo)
 
+    HDFS-5559. Fix TestDatanodeConfig in HDFS-2832. (Contributed by szetszwo)
+

+ 3 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java

@@ -20,6 +20,7 @@ package org.apache.hadoop.hdfs;
 import static org.apache.hadoop.hdfs.server.common.Util.fileAsURI;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 
 import java.io.File;
@@ -82,7 +83,8 @@ public class TestDatanodeConfig {
     DataNode dn = null;
     try {
       dn = DataNode.createDataNode(new String[]{}, conf);
-    } catch(IOException e) {
+      fail();
+    } catch(Exception e) {
       // expecting exception here
     }
     if(dn != null)