Repository: hadoop Updated Branches: refs/heads/branch-2.8 06df0cd87 -> 288f9ccde
HDFS-5805. TestCheckpoint.testCheckpoint fails intermittently on branch-2. Contributed by Eric Badger. (cherry picked from commit 5e5b8793fba8e25aeba7a74878da4cf8e806f061) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/288f9ccd Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/288f9ccd Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/288f9ccd Branch: refs/heads/branch-2.8 Commit: 288f9ccde29d7fc61059f59fa001e88b20c35f7a Parents: 06df0cd Author: Kihwal Lee <kih...@apache.org> Authored: Tue Aug 2 15:43:11 2016 -0500 Committer: Kihwal Lee <kih...@apache.org> Committed: Tue Aug 2 15:43:11 2016 -0500 ---------------------------------------------------------------------- .../apache/hadoop/hdfs/server/namenode/TestCheckpoint.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/288f9ccd/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java index ad10919..d914b09 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java @@ -1039,6 +1039,7 @@ public class TestCheckpoint { */ @Test public void testCheckpoint() throws IOException { + Path tmpDir = new Path("/tmp_tmp"); Path file1 = new Path("checkpoint.dat"); Path file2 = new Path("checkpoint2.dat"); Configuration conf = new HdfsConfiguration(); @@ -1065,6 +1066,11 @@ public class TestCheckpoint { writeFile(fileSys, file1, replication); checkFile(fileSys, file1, replication); + for(int i=0; i < 1000; i++) { + fileSys.mkdirs(tmpDir); + fileSys.delete(tmpDir, true); + } + // // Take a checkpoint // @@ -1089,7 +1095,6 @@ public class TestCheckpoint { // // Restart cluster and verify that file1 still exist. // - Path tmpDir = new Path("/tmp_tmp"); try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(numDatanodes) .format(false).build(); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org