HADOOP-15532. TestBasicDiskValidator fails with NoSuchFileException. 
Contributed by Giovanni Matteo Fumarola.

(cherry picked from commit aeaf9fec62f10699d1c809d66444520fe4533c2c)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b3f4c276
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b3f4c276
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b3f4c276

Branch: refs/heads/branch-2
Commit: b3f4c27661b73916fafc5cec3f5e821f736acf82
Parents: 2e059ff
Author: Inigo Goiri <inigo...@apache.org>
Authored: Tue Jun 12 14:16:14 2018 -0700
Committer: Inigo Goiri <inigo...@apache.org>
Committed: Tue Jun 12 14:21:45 2018 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/hadoop/util/TestDiskChecker.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b3f4c276/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java
index 6b6c6c8..e92c9ed 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java
@@ -137,7 +137,8 @@ public class TestDiskChecker {
    * @throws java.io.IOException if any
    */
   protected File createTempFile() throws java.io.IOException {
-    File testDir = new File(System.getProperty("test.build.data"));
+    File testDir =
+        new File(System.getProperty("test.build.data", "target/test-dir"));
     return Files.createTempFile(testDir.toPath(), "test", "tmp").toFile();
   }
 
@@ -147,7 +148,8 @@ public class TestDiskChecker {
    * @throws java.io.IOException if any
    */
   protected File createTempDir() throws java.io.IOException {
-    File testDir = new File(System.getProperty("test.build.data"));
+    File testDir =
+        new File(System.getProperty("test.build.data", "target/test-dir"));
     return Files.createTempDirectory(testDir.toPath(), "test").toFile();
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to