diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java index a0308b90fb1..9e4f727cc34 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java @@ -55,7 +55,6 @@ import java.util.Collection; import java.util.EnumSet; import java.util.Iterator; import java.util.Map; -import java.util.NoSuchElementException; import java.util.Random; import com.google.common.collect.ImmutableList; @@ -405,7 +404,7 @@ public class TestWebHDFS { try { it.next(); fail("Iterator should error if out of elements."); - } catch (NoSuchElementException e) { + } catch (IllegalStateException e) { // pass } return null;