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

Ivan A. Veselovsky commented on HADOOP-8992:
--------------------------------------------

Actualy @Before method not just creates a few files: it, in particular, invokes 
HarFileSystem#initialize(), which is not quite trivial.
Actually, I'm not strongly against putting everything into one class, but I see 
several maintenance and extensibility reasons to have separate files:
1) if there will be a failure in @Before method, it will block all the tests in 
the class from being executed, including the ones that do not need the @Before.
2) if somebody will add some new Har tests that do not need a preparation, or 
need another preparation, he will be able to add them to the @Before-less 
class, or in a newly created test class. But if we combine the tests into one 
class, he will also possibly tend to add tests into the same single class, this 
way elevating the number of tests that do not need this @Before  preparation, 
or, if the @before will need to be extended, load it with some functionality 
that is also not needed for existing tests. What I actually mean there: making 
the classes separate we would provide more correct advice for further test 
development, imho.

But, in anyway, your decision is to be final there.
                
> Enhance unit-test coverage of class HarFileSystem
> -------------------------------------------------
>
>                 Key: HADOOP-8992
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8992
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Ivan A. Veselovsky
>            Assignee: Ivan A. Veselovsky
>            Priority: Minor
>         Attachments: HADOOP-8992-branch-0.23--a.patch, 
> HADOOP-8992-branch-0.23--b.patch, HADOOP-8992-branch-2--a.patch, 
> HADOOP-8992-branch-2--b.patch
>
>
> New unit test TestHarFileSystem2 provided in order to enhance coverage of 
> class HarFileSystem.
> Also some unused methods deleted from class HarFileSystem.

--
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