hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r704599 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/hdfs/TestFileCreation.java src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java
Date Tue, 14 Oct 2008 18:38:29 GMT
Author: szetszwo
Date: Tue Oct 14 11:38:29 2008
New Revision: 704599

URL: http://svn.apache.org/viewvc?rev=704599&view=rev
Log:
HADOOP-4403. Make TestLeaseRecovery and TestFileCreation more robust. (szetszwo)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestFileCreation.java
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=704599&r1=704598&r2=704599&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Oct 14 11:38:29 2008
@@ -905,6 +905,9 @@
     HADOOP-4400. Add "hdfs://" to fs.default.name on quickstart.html.
     (Jeff Hammerbacher via omalley)
 
+    HADOOP-4403. Make TestLeaseRecovery and TestFileCreation more robust.
+    (szetszwo)
+
 Release 0.18.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestFileCreation.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestFileCreation.java?rev=704599&r1=704598&r2=704599&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestFileCreation.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestFileCreation.java Tue Oct 14 11:38:29
2008
@@ -226,7 +226,6 @@
         assertEquals(SimulatedFSDataset.DEFAULT_CAPACITY-fileSize, dn.getFSDataset().getRemaining());
       }
     } finally {
-      fs.close();
       cluster.shutdown();
     }
   }
@@ -359,7 +358,6 @@
       assertTrue("Error blocks were not cleaned up",
                  locations.locatedBlockCount() == 0);
     } finally {
-      fs.close();
       cluster.shutdown();
       client.close();
     }
@@ -595,20 +593,10 @@
       // This should close all existing file.
       dfsclient.close();
 
-      try {
-        fs.close();
-        fs = null;
-      } catch (IOException e) {
-      }
-
       // reopen file system and verify that file exists.
-      fs = cluster.getFileSystem();
-      assertTrue(file1 + " does not exist.", fs.exists(file1));
-
+      assertTrue(file1 + " does not exist.", 
+          AppendTestUtil.createHdfsWithDifferentUsername(conf).exists(file1));
     } finally {
-      if (fs != null) {
-        fs.close();
-      }
       cluster.shutdown();
     }
   }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java?rev=704599&r1=704598&r2=704599&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java Tue Oct 14 11:38:29
2008
@@ -70,6 +70,7 @@
       Path filepath = new Path(filestr);
       DFSTestUtil.createFile(dfs, filepath, ORG_FILE_SIZE, REPLICATION_NUM, 0L);
       assertTrue(dfs.dfs.exists(filestr));
+      DFSTestUtil.waitReplication(dfs, filepath, REPLICATION_NUM);
 
       //get block info for the last block
       LocatedBlock locatedblock = TestInterDatanodeProtocol.getLastLocatedBlock(



Mime
View raw message