From 68f56ca906a845417705beef53bfb0f86117c260 Mon Sep 17 00:00:00 2001 From: Konstantin Shvachko Date: Tue, 29 Nov 2011 00:03:49 +0000 Subject: [PATCH] HDFS-2287. Fix second assert. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1207710 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../test/java/org/apache/hadoop/hdfs/TestParallelRead.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 043c1ff23ca..6e6c714acc3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1978,6 +1978,8 @@ Release 0.22.0 - Unreleased HDFS-2346. TestHost2NodesMap & TestReplicasMap will fail depending upon execution order of test methods (Laxman, Uma Maheswara Rao G via shv) + HDFS-2287. TestParallelRead has a small off-by-one bug. (todd) + Release 0.21.1 - Unreleased HDFS-1466. TestFcHdfsSymlink relies on /tmp/test not existing. (eli) 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 c5aec722fc3..bbd001236f2 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 @@ -156,8 +156,8 @@ public class TestParallelRead { */ private void pRead(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; byte buf[] = new byte[len];