From 3bc2e1d992e1778d4de5836ae69f1958afa21532 Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Tue, 4 Apr 2017 09:57:56 -0700 Subject: [PATCH] HDFS-11619. Ozone: Unit tests running failed in Windows. Contributed by Yiqun Lin. --- .../java/org/apache/hadoop/ozone/MiniOzoneCluster.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java index 0398491cac4..0a5120e5fe8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java @@ -43,7 +43,6 @@ import java.io.Closeable; import java.io.IOException; import java.net.InetSocketAddress; import java.net.URISyntaxException; -import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -260,9 +259,9 @@ public final class MiniOzoneCluster extends MiniDFSCluster super(conf); this.conf = conf; - URL p = conf.getClass().getResource(""); - path = p.getPath().concat(MiniOzoneCluster.class.getSimpleName() + UUID - .randomUUID().toString()); + path = GenericTestUtils.getTempPath( + MiniOzoneCluster.class.getSimpleName() + + UUID.randomUUID().toString()); runID = UUID.randomUUID(); }