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

Andrew Wang commented on HDFS-5564:
-----------------------------------

My quick audit of that test file was that there are two configs being used, 
probably from when the two test files were merged originally. In this case, I 
think it's better to just re-split them and relegate the common setup/teardown 
to shared @Before and @After methods.

I agree though that generally, if each test needs a different conf or setup, 
then we should just do it in each test separately. If this comes up, then we 
can split off another test file to do so. Maybe even as part of this refactor 
if we find any tests like that.

> Refactor tests in TestCacheDirectives
> -------------------------------------
>
>                 Key: HDFS-5564
>                 URL: https://issues.apache.org/jira/browse/HDFS-5564
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>            Priority: Trivial
>
> Some of the tests in TestCacheDirectives start their own MiniDFSCluster to 
> get a new config, even though we already start a cluster in the @Before 
> function. This contributes to longer test runs and code duplication.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to