hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r825219 - in /hadoop/hdfs/branches/branch-0.21: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestBlockUnderConstruction.java
Date Wed, 14 Oct 2009 18:53:26 GMT
Author: szetszwo
Date: Wed Oct 14 18:53:26 2009
New Revision: 825219

URL: http://svn.apache.org/viewvc?rev=825219&view=rev
Log:
HDFS-682. Fix bugs in TestBlockUnderConstruction.

Modified:
    hadoop/hdfs/branches/branch-0.21/CHANGES.txt
    hadoop/hdfs/branches/branch-0.21/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestBlockUnderConstruction.java

Modified: hadoop/hdfs/branches/branch-0.21/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.21/CHANGES.txt?rev=825219&r1=825218&r2=825219&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/hdfs/branches/branch-0.21/CHANGES.txt Wed Oct 14 18:53:26 2009
@@ -382,6 +382,8 @@
     HDFS-673. BlockReceiver#PacketResponder should not remove a packet from
     the ack queue before its ack is sent. (hairong)
 
+    HDFS-682. Fix bugs in TestBlockUnderConstruction.  (szetszwo)
+
 Release 0.20.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/hdfs/branches/branch-0.21/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestBlockUnderConstruction.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.21/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestBlockUnderConstruction.java?rev=825219&r1=825218&r2=825219&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.21/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestBlockUnderConstruction.java
(original)
+++ hadoop/hdfs/branches/branch-0.21/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestBlockUnderConstruction.java
Wed Oct 14 18:53:26 2009
@@ -115,12 +115,13 @@
           ns.blockManager.getStoredBlock(curBlock) == curBlock);
     }
 
-    // the last block is under construction if the file is not closed
+    // The last block is complete if the file is closed.
+    // If the file is open, the last block may be complete or not. 
     curBlock = blocks[idx]; // last block
-    assertEquals("Block " + curBlock +
-        " isComplete = " + curBlock.isComplete() +
-        " expected to be " + isFileOpen,
-        isFileOpen, !curBlock.isComplete());
+    if (!isFileOpen) {
+      assertTrue("Block " + curBlock + ", isFileOpen = " + isFileOpen,
+          curBlock.isComplete());
+    }
     assertTrue("Block is not in BlocksMap: " + curBlock,
         ns.blockManager.getStoredBlock(curBlock) == curBlock);
   }



Mime
View raw message