Browse Source

MAPREDUCE-4916. Fix flaxy test TestTrackerDistributedCacheManager. Contributed by Xuan Gong.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1429233 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 12 years ago
parent
commit
b7b3405f0d

+ 3 - 0
CHANGES.txt

@@ -395,6 +395,9 @@ Release 1.2.0 - unreleased
 
 
     HADOOP-9179. TestFileSystem fails with open JDK7. (Brandon Li via suresh)
     HADOOP-9179. TestFileSystem fails with open JDK7. (Brandon Li via suresh)
 
 
+    MAPREDUCE-4916. Fix flaxy test TestTrackerDistributedCacheManager. (Xuan
+    Gong via acmurthy) 
+
 Release 1.1.2 - Unreleased
 Release 1.1.2 - Unreleased
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 3 - 2
src/test/org/apache/hadoop/filecache/TestTrackerDistributedCacheManager.java

@@ -92,9 +92,10 @@ public class TestTrackerDistributedCacheManager extends TestCase {
 
 
     // Prepare the tests' root dir
     // Prepare the tests' root dir
     File TEST_ROOT = new File(TEST_ROOT_DIR);
     File TEST_ROOT = new File(TEST_ROOT_DIR);
-    if (!TEST_ROOT.exists()) {
-      TEST_ROOT.mkdirs();
+    if (TEST_ROOT.exists()) {
+      FileUtil.fullyDelete(new File(TEST_ROOT_DIR));
     }
     }
+    TEST_ROOT.mkdirs();
 
 
     conf = new Configuration();
     conf = new Configuration();
     conf.set(FileSystem.FS_DEFAULT_NAME_KEY, "file:///");
     conf.set(FileSystem.FS_DEFAULT_NAME_KEY, "file:///");