Yiqun Lin created HDFS-11619: -------------------------------- Summary: Ozone: Unit tests running failed in Windows Key: HDFS-11619 URL: https://issues.apache.org/jira/browse/HDFS-11619 Project: Hadoop HDFS Issue Type: Sub-task Components: ozone Reporter: Yiqun Lin Assignee: Yiqun Lin
The unit tests runs failed in Windows. The stack infos in my local when I ran the test {{TestAllocateContainer#testAllocate}}: {code} java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/work-project/hadoop/hadoop-hdfs-project/hadoop-hdfs/target/test-classes/org/apache/hadoop/ozone/MiniOzoneCluster2f590eac-54a9-4f7d-9f91-911090d581aa\d54f6948-ea8c-4ade-8fa2-4b7bf849ed87\scm at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84) at org.apache.hadoop.ozone.MiniOzoneCluster$Builder.configScmMetadata(MiniOzoneCluster.java:370) at org.apache.hadoop.ozone.MiniOzoneCluster$Builder.build(MiniOzoneCluster.java:326) at org.apache.hadoop.ozone.scm.TestAllocateContainer.init(TestAllocateContainer.java:54) {code} The root cause of the failure is that the path generated for the scm is not a valid path. We should replace the following related code in {{MiniOzoneCluster.Builder#Builder()}}. {code} URL p = conf.getClass().getResource(""); path = p.getPath().concat(MiniOzoneCluster.class.getSimpleName() + UUID .randomUUID().toString()); {code} One way maybe we can use {{GenericTestUtils#getTempPath}} to replace with it. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org