diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-2832.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-2832.txt index beced410222..cb2b7bd01dc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-2832.txt +++ b/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) + diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java index 35b492ebb25..9a331069135 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java +++ b/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)