diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 238d9aba55..a33030c5e5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -5,6 +5,9 @@ Trunk (unreleased changes) HDFS-395. DFS Scalability: Incremental block reports. (Tomasz Nykiel via hairong) + BUG FIXES + HDFS-2287. TestParallelRead has a small off-by-one bug. (todd) + Release 0.23.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestParallelRead.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestParallelRead.java index eb37422ad1..c5aec722fc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestParallelRead.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestParallelRead.java @@ -109,11 +109,11 @@ public void run() { pRead(startOff, len); bytesRead += len; } - } catch (Exception ex) { + } catch (Throwable t) { LOG.error(getName() + ": Error while testing read at " + startOff + " length " + len); error = true; - fail(ex.getMessage()); + fail(t.getMessage()); } } } @@ -135,8 +135,8 @@ public boolean hasError() { */ private void read(int start, int len) throws Exception { assertTrue( - "Bad args: " + start + " + " + len + " should be < " + fileSize, - start + len < fileSize); + "Bad args: " + start + " + " + len + " should be <= " + fileSize, + start + len <= fileSize); DFSInputStream dis = testInfo.dis; synchronized (dis) {