You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sz...@apache.org on 2008/10/14 20:40:25 UTC
svn commit: r704601 - in /hadoop/core/branches/branch-0.19: CHANGES.txt
src/test/org/apache/hadoop/hdfs/TestFileCreation.java
src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java
Author: szetszwo
Date: Tue Oct 14 11:40:24 2008
New Revision: 704601
URL: http://svn.apache.org/viewvc?rev=704601&view=rev
Log:
HADOOP-4403. Make TestLeaseRecovery and TestFileCreation more robust. (szetszwo)
Modified:
hadoop/core/branches/branch-0.19/CHANGES.txt
hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileCreation.java
hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java
Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=704601&r1=704600&r2=704601&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Tue Oct 14 11:40:24 2008
@@ -851,6 +851,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/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileCreation.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileCreation.java?rev=704601&r1=704600&r2=704601&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileCreation.java (original)
+++ hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestFileCreation.java Tue Oct 14 11:40:24 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/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java?rev=704601&r1=704600&r2=704601&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java (original)
+++ hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/TestLeaseRecovery.java Tue Oct 14 11:40:24 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(