Chen He created HADOOP-13021:
--------------------------------

             Summary: Hadoop swift driver unit test should use unique directory 
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


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)

Reply via email to