Skip to content

Commit

Permalink
HDFS-15626. TestWebHDFS.testLargeDirectory failing (#2380)
Browse files Browse the repository at this point in the history
Fixes the regression caused by HADOOP-17281, where the WebHDFS client
listStatusIterator (correctly) throws NoSuchElementException when next()
runs out of values.

Contributed by Mukund Thakur.

Change-Id: I6cec41c20467920cf21f169653553535414b2680
  • Loading branch information
mukund-thakur authored and steveloughran committed Oct 13, 2020
1 parent d606ddc commit 0507c41
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -55,6 +55,7 @@
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;
Expand Down Expand Up @@ -404,7 +405,7 @@ public Void run() throws IOException, URISyntaxException {
try {
it.next();
fail("Iterator should error if out of elements.");
} catch (IllegalStateException e) {
} catch (NoSuchElementException e) {
// pass
}
return null;
Expand Down

0 comments on commit 0507c41

Please sign in to comment.