hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1207711 - in /hadoop/common/branches/branch-0.22/hdfs: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/TestParallelRead.java
Date Tue, 29 Nov 2011 00:05:15 GMT
Author: shv
Date: Tue Nov 29 00:05:14 2011
New Revision: 1207711

URL: http://svn.apache.org/viewvc?rev=1207711&view=rev
Log:
HDFS-2287. TestParallelRead has a small off-by-one bug. Contributed by Todd Lipcon.


Modified:
    hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
    hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestParallelRead.java

Modified: hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt?rev=1207711&r1=1207710&r2=1207711&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt Tue Nov 29 00:05:14 2011
@@ -675,6 +675,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 via shv)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestParallelRead.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestParallelRead.java?rev=1207711&r1=1207710&r2=1207711&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestParallelRead.java
(original)
+++ hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestParallelRead.java
Tue Nov 29 00:05:14 2011
@@ -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) {
@@ -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];



Mime
View raw message