[ 
https://issues.apache.org/jira/browse/HADOOP-10351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908018#comment-13908018
 ] 

Jinghui Wang commented on HADOOP-10351:
---------------------------------------

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

> Unit test TestSwiftFileSystemLsOperations#testListEmptyRoot and 
> testListEmptyRoot failure.
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-10351
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10351
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test, tools
>    Affects Versions: 2.3.0
>            Reporter: Jinghui Wang
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-10351.patch
>
>
> TestSwiftFileSystemLsOperations#testListEmptyRoot and testListEmptyRoot 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>



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to