Hadoop Common
  1. Hadoop Common
  2. HADOOP-10351

Unit test TestSwiftFileSystemLsOperations#testListEmptyRoot and testListNonEmptyRoot failure.

    Details

    • Type: Test Test
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: fs/swift, test
    • Labels:
      None

      Description

      TestSwiftFileSystemLsOperations#testListEmptyRoot and testLisNontEmptyRoot fails because the unit test TestFSMainOperationsSwift creates the testing directory test.build.dir through its parent class. But during the parent classes tearDown, only the test.build.dir/test directory is deleted leaving the test.build.dir in the container. However, tests TestSwiftFileSystemLsOperations#testListEmptyRoot and testListEmptyRoot do not expect the directory to exists in the container thus causing the failure.

      TestSwiftFileSystemLsOperations.testListEmptyRoot:126->Assert.assertEquals:472->Assert.assertEquals:128->Assert.failNotEquals:647->Assert.fail:93 Non-empty root/[00] SwiftFileStatus

      { path=swift://container1.service/home; isDirectory=true; length=0; blocksize=33554432; modification_time=1392850893440}

      expected:<0> but was:<1>
      TestSwiftFileSystemLsOperations.testListNonEmptyRoot:137->Assert.assertEquals:472->Assert.assertEquals:128->Assert.failNotEquals:647->Assert.fail:93 Wrong #of root children/[00] SwiftFileStatus

      { path=swift://container1.service/home; isDirectory=true; length=0; blocksize=33554432; modification_time=1392850893440}

      [01] SwiftFileStatus

      { path=swift://patchtest.softlayer/test; isDirectory=true; length=0; blocksize=33554432; modification_time=1392851462990}

      expected:<1> but was:<2>

        Activity

        Hide
        Jinghui Wang added a comment -

        Patch attached overriding the parent class tearDown method to make sure the whole test directory is completely deleted from the swift container.

        Show
        Jinghui Wang added a comment - Patch attached overriding the parent class tearDown method to make sure the whole test directory is completely deleted from the swift container.
        Hide
        Steve Loughran added a comment -

        This is interesting: I've not seen this in my tests -but it sounds like the ordering of tests defines this.

        Fix-wise, I think it's better to have the tests themselves be more robust by doing a delete("/", true) before the rest of the work.
        This stops us worrying about teardown in external tests, and just forces the object store into the desired state before the run.

        Do want to supply that patch?

        Show
        Steve Loughran added a comment - This is interesting: I've not seen this in my tests -but it sounds like the ordering of tests defines this. Fix-wise, I think it's better to have the tests themselves be more robust by doing a delete("/", true) before the rest of the work. This stops us worrying about teardown in external tests, and just forces the object store into the desired state before the run. Do want to supply that patch?
        Hide
        Jinghui Wang added a comment -

        Thanks Steve. Updated the patch to make sure those tests start with a clean root directory in the container.

        Show
        Jinghui Wang added a comment - Thanks Steve. Updated the patch to make sure those tests start with a clean root directory in the container.
        Hide
        Kazuki OIKAWA added a comment -

        I encountered this problem too.
        Attached patch is works fine.

        Show
        Kazuki OIKAWA added a comment - I encountered this problem too. Attached patch is works fine.
        Hide
        ramtin added a comment -

        +1 (non binding)

        Show
        ramtin added a comment - +1 (non binding)
        Hide
        Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 6s docker + precommit patch detected.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 3m 0s trunk passed
        +1 compile 0m 11s trunk passed with JDK v1.8.0_60
        +1 compile 0m 13s trunk passed with JDK v1.7.0_79
        +1 checkstyle 0m 8s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 0m 30s trunk passed
        +1 javadoc 0m 13s trunk passed with JDK v1.8.0_60
        +1 javadoc 0m 15s trunk passed with JDK v1.7.0_79
        +1 mvninstall 0m 14s the patch passed
        +1 compile 0m 11s the patch passed with JDK v1.8.0_60
        +1 javac 0m 11s the patch passed
        +1 compile 0m 13s the patch passed with JDK v1.7.0_79
        +1 javac 0m 13s the patch passed
        +1 checkstyle 0m 8s the patch passed
        +1 mvneclipse 0m 12s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 0m 39s the patch passed
        +1 javadoc 0m 13s the patch passed with JDK v1.8.0_60
        +1 javadoc 0m 14s the patch passed with JDK v1.7.0_79
        +1 unit 0m 12s hadoop-openstack in the patch passed with JDK v1.8.0_60.
        +1 unit 0m 12s hadoop-openstack in the patch passed with JDK v1.7.0_79.
        +1 asflicense 0m 23s Patch does not generate ASF License warnings.
        8m 37s



        Subsystem Report/Notes
        Docker Client=1.7.1 Server=1.7.1 Image:test-patch-base-hadoop-date2015-11-03
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12648841/HADOOP-10351.patch
        JIRA Issue HADOOP-10351
        Optional Tests asflicense javac javadoc mvninstall unit findbugs checkstyle compile
        uname Linux 3d5f8e84581f 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HADOOP-Build/patchprocess/apache-yetus-1a9afee/precommit/personality/hadoop.sh
        git revision trunk / dac0463
        Default Java 1.7.0_79
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_60 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79
        findbugs v3.0.0
        JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8017/testReport/
        modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack
        Max memory used 227MB
        Powered by Apache Yetus http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8017/console

        This message was automatically generated.

        Show
        Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 6s docker + precommit patch detected. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 3m 0s trunk passed +1 compile 0m 11s trunk passed with JDK v1.8.0_60 +1 compile 0m 13s trunk passed with JDK v1.7.0_79 +1 checkstyle 0m 8s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 0m 30s trunk passed +1 javadoc 0m 13s trunk passed with JDK v1.8.0_60 +1 javadoc 0m 15s trunk passed with JDK v1.7.0_79 +1 mvninstall 0m 14s the patch passed +1 compile 0m 11s the patch passed with JDK v1.8.0_60 +1 javac 0m 11s the patch passed +1 compile 0m 13s the patch passed with JDK v1.7.0_79 +1 javac 0m 13s the patch passed +1 checkstyle 0m 8s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 0m 39s the patch passed +1 javadoc 0m 13s the patch passed with JDK v1.8.0_60 +1 javadoc 0m 14s the patch passed with JDK v1.7.0_79 +1 unit 0m 12s hadoop-openstack in the patch passed with JDK v1.8.0_60. +1 unit 0m 12s hadoop-openstack in the patch passed with JDK v1.7.0_79. +1 asflicense 0m 23s Patch does not generate ASF License warnings. 8m 37s Subsystem Report/Notes Docker Client=1.7.1 Server=1.7.1 Image:test-patch-base-hadoop-date2015-11-03 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12648841/HADOOP-10351.patch JIRA Issue HADOOP-10351 Optional Tests asflicense javac javadoc mvninstall unit findbugs checkstyle compile uname Linux 3d5f8e84581f 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HADOOP-Build/patchprocess/apache-yetus-1a9afee/precommit/personality/hadoop.sh git revision trunk / dac0463 Default Java 1.7.0_79 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_60 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79 findbugs v3.0.0 JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8017/testReport/ modules C: hadoop-tools/hadoop-openstack U: hadoop-tools/hadoop-openstack Max memory used 227MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8017/console This message was automatically generated.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jinghui Wang
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development