Browse Source

HADOOP-7364. TestMiniMRDFSCaching fails if test.build.dir is set to something other than build/test (Thomas Graves via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1133692 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 14 years ago
parent
commit
5160ac2a42
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/test/org/apache/hadoop/mapred/MRCaching.java

+ 2 - 1
src/test/org/apache/hadoop/mapred/MRCaching.java

@@ -189,7 +189,8 @@ public class MRCaching {
 
   static void setupCache(String cacheDir, FileSystem fs) 
   throws IOException {
-    Path localPath = new Path("build/test/cache");
+    Path localPath = new Path(System.getProperty("test.cache.data", "build/test/cache"));
+
     Path txtPath = new Path(localPath, new Path("test.txt"));
     Path jarPath = new Path(localPath, new Path("test.jar"));
     Path zipPath = new Path(localPath, new Path("test.zip"));