hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1209230 - in /hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs: CHANGES.HDFS-1623.txt src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java
Date Thu, 01 Dec 2011 20:38:47 GMT
Author: todd
Date: Thu Dec  1 20:38:46 2011
New Revision: 1209230

URL: http://svn.apache.org/viewvc?rev=1209230&view=rev
Log:
HDFS-2622. Fix TestDFSUpgrade in HA branch. Contributed by Todd Lipcon.

Modified:
    hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt
    hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java

Modified: hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt?rev=1209230&r1=1209229&r2=1209230&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt
(original)
+++ hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt
Thu Dec  1 20:38:46 2011
@@ -33,3 +33,5 @@ HDFS-1975. Support for sharing the namen
 HDFS-1971. Send block report from datanode to both active and standby namenodes. (sanjay,
todd via suresh)
 
 HDFS-2616. Change DatanodeProtocol#sendHeartbeat() to return HeartbeatResponse. (suresh)
+
+HDFS-2622. Fix TestDFSUpgrade in HA branch. (todd)

Modified: hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java?rev=1209230&r1=1209229&r2=1209230&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java
(original)
+++ hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java
Thu Dec  1 20:38:46 2011
@@ -34,6 +34,7 @@ import org.apache.hadoop.hdfs.server.nam
 import static org.apache.hadoop.hdfs.server.namenode.NNStorage.getInProgressEditsFileName;
 import static org.apache.hadoop.hdfs.server.namenode.NNStorage.getImageFileName;
 
+import static org.apache.hadoop.test.GenericTestUtils.assertExists;
 import org.apache.hadoop.util.StringUtils;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -51,7 +52,7 @@ import static org.junit.Assert.*;
 */
 public class TestDFSUpgrade {
  
-  private static final int EXPECTED_TXID = 17;
+  private static final int EXPECTED_TXID = 33;
   private static final Log LOG = LogFactory.getLog(TestDFSUpgrade.class.getName());
   private Configuration conf;
   private int testCounter = 0;
@@ -80,16 +81,16 @@ public class TestDFSUpgrade {
           Joiner.on("  \n").join(new File(baseDir, "current").list()));
       LOG.info("==================");
       
-      assertTrue(new File(baseDir,"current").isDirectory());
-      assertTrue(new File(baseDir,"current/VERSION").isFile());
-      assertTrue(new File(baseDir,"current/" 
-                          + getInProgressEditsFileName(imageTxId + 1)).isFile());
-      assertTrue(new File(baseDir,"current/" 
-                          + getImageFileName(imageTxId)).isFile());
-      assertTrue(new File(baseDir,"current/seen_txid").isFile());
+      assertExists(new File(baseDir,"current"));
+      assertExists(new File(baseDir,"current/VERSION"));
+      assertExists(new File(baseDir,"current/" 
+                          + getInProgressEditsFileName(imageTxId + 1)));
+      assertExists(new File(baseDir,"current/" 
+                          + getImageFileName(imageTxId)));
+      assertExists(new File(baseDir,"current/seen_txid"));
       
       File previous = new File(baseDir, "previous");
-      assertTrue(previous.isDirectory());
+      assertExists(previous);
       assertEquals(UpgradeUtilities.checksumContents(NAME_NODE, previous),
           UpgradeUtilities.checksumMasterNameNodeContents());
     }



Mime
View raw message