Author: suresh
Date: Fri Jan  4 03:31:30 2013
New Revision: 1428711

URL: http://svn.apache.org/viewvc?rev=1428711&view=rev
Log:
HDFS-4358. TestCheckpoint failure with JDK7. Contributed by Arpit Agarwal.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1428711&r1=1428710&r2=1428711&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Fri Jan  4 03:31:30 2013
@@ -388,6 +388,8 @@ Release 1.2.0 - unreleased
     HDFS-4355. TestNameNodeMetrics.testCorruptBlock fails with open JDK7.
     (Brandon Li via suresh)
 
+    HDFS-4358. TestCheckpoint failure with JDK7. (Arpit Agarwal via suresh)
+
 Release 1.1.2 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: 
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java?rev=1428711&r1=1428710&r2=1428711&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
 (original)
+++ 
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
 Fri Jan  4 03:31:30 2013
@@ -730,6 +730,8 @@ public class TestCheckpoint extends Test
   public void testMultipleSecondaryNameNodes() throws IOException {
     MiniDFSCluster cluster = null;
     FileSystem fs = null;
+    SecondaryNameNode snn1 = null;
+
     try {
       Configuration conf = new Configuration();
       cluster = new MiniDFSCluster(conf, 0, true, null);
@@ -742,7 +744,7 @@ public class TestCheckpoint extends Test
       assertTrue(fs.mkdirs(testPath1));
       
       // Start up a 2NN and do a checkpoint.
-      SecondaryNameNode snn1 = startSecondaryNameNode(conf);
+      snn1 = startSecondaryNameNode(conf);
       snn1.doCheckpoint();
       
       assertTrue(testPath1 + " should still exist after good checkpoint",
@@ -788,6 +790,7 @@ public class TestCheckpoint extends Test
       assertTrue(testPath2 + " should exist after bad checkpoint, after 
restart",
           fs.exists(testPath2));
     } finally {
+      if(snn1 != null) snn1.shutdown();
       if(fs != null) fs.close();
       if(cluster!= null) cluster.shutdown();
     }


Reply via email to