[
https://issues.apache.org/jira/browse/HADOOP-13021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15254431#comment-15254431
]
Chen He commented on HADOOP-13021:
----------------------------------
Thank you for the reply, [[email protected]]. I agree with you. However, there
could be corner case such as JVM crashes or unit tests terminated in outage.
Even we set different value for each machine, for example, machine A has its
own bucket. Because of previous outage, there is some leftover directories or
files. The next unit test run incline to report error.
I propose we use some timestamp for those hard values. Combining your suggest,
we can guarantee that in every time unit test runs on every machine, they are
using different hard values. Then, we may be little bit safer than current
solution.
> Hadoop swift driver unit test should use unique directory for each run
> ----------------------------------------------------------------------
>
> Key: HADOOP-13021
> URL: https://issues.apache.org/jira/browse/HADOOP-13021
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs/swift
> Affects Versions: 2.7.2
> Reporter: Chen He
> Assignee: Chen He
> Labels: unit-test
>
> Since all "unit test" in swift package are actually functionality test, it
> requires server's information in the core-site.xml file. However, multiple
> unit test runs on difference machines using the same core-site.xml file will
> result in some unit tests failure. For example:
> In TestSwiftFileSystemBasicOps.java
> public void testMkDir() throws Throwable {
> Path path = new Path("/test/MkDir");
> fs.mkdirs(path);
> //success then -so try a recursive operation
> fs.delete(path, true);
> }
> It is possible that machine A and B are running "mvn clean install" using
> same core-site.xml file. However, machine A run testMkDir() first and delete
> the dir, but machine B just tried to run fs.delete(path,true). It will report
> failure. This is just an example. There are many similar cases in the unit
> test sets. I would propose we use a unique dir for each unit test run instead
> of using "Path path = new Path("/test/MkDir")" for all concurrent runs
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)