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

Steve Loughran commented on HADOOP-9360:
----------------------------------------

I'm always pleased to see new tests

# there's some abuse of introspection in the migration tests, I'd recommend 
package-scoped accessors marked {{@VisibleForTesting}} to get at the internals 
instead. If it's JetS3t internals you are playing with, then introspection 
exceptions should be caught and downgraded to {{AssumptionViolatedException}}, 
so the failure is converted to a skip.

# a couple of the tests look for specific text in exceptions. I don't like that 
-either make the string constant in the source class, or change S3 &s3n to 
raise specific exceptions for these failures (e.g unauthorised). 
# {{S3ServerStub.writeFile()}} should always close, even on an exception. That 
must not be in the finally, as you wan't problems in a normal close() to 
surface. Instead {{IOException}} should be caught, {{FileUtils.close()}} used 
to close the stream quietly.
# must use {{Exception.toString()}} over {{Exception.getMessage()}} except for 
the specific checks of exception messages
# would be nice to have text messages on all assertion failures.
# trivial: needs a quick proofread of comments and method names. In particular 
{{getDummiTextFile}} should be {{getDummyTextFile}}

                
> Coverage fix for org.apache.hadoop.fs.s3
> ----------------------------------------
>
>                 Key: HADOOP-9360
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9360
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: fs/s3
>    Affects Versions: 3.0.0, 0.23.7, 2.0.4-beta
>            Reporter: Aleksey Gorshkov
>         Attachments: HADOOP-9360-branch-0.23.patch, HADOOP-9360-trunk.patch
>
>
> Coverage fix for org.apache.hadoop.fs.s3
> patch HADOOP-9360-trunk.patch for trunk and branch-2 
> HADOOP-9360-branch-0.23.patch for branch-0.23

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to