HDFS-2287. TestParallelRead has a small off-by-one bug. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1162005 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2011-08-26 06:51:57 +00:00
parent 7cf49f5d9c
commit 23e7fc4f46
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -109,11 +109,11 @@ public class TestParallelRead {
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 class TestParallelRead {
*/
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) {