[ 
https://issues.apache.org/jira/browse/HDFS-669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eli Collins updated HDFS-669:
-----------------------------

    Attachment: HDFS669.patch

Attached is a patch with a couple tests that exercise FSNamesystem directly. 
One tests rename in safe mode, the other the inode name quota (the latter is 
not a particularly great test since it can be easily verified at a higher-level 
but you get the idea). Each runs in less than a second on my laptop. NameNode's 
initMetrics method had to be made package rather than private.  That could be 
avoided by using the reflection API (Field.setAccessible) when running the test.

> Add unit tests 
> ---------------
>
>                 Key: HDFS-669
>                 URL: https://issues.apache.org/jira/browse/HDFS-669
>             Project: Hadoop HDFS
>          Issue Type: Test
>          Components: test
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: HDFS669.patch
>
>
> Most HDFS tests are functional tests that test a feature end to end by 
> running a mini cluster. We should add more tests like TestReplication that 
> attempt to stress individual classes in isolation, ie by stubbing out 
> dependencies without running a mini cluster. This allows for more fine-grain 
> testing and making tests run much more quickly because they avoid the cost of 
> cluster setup and teardown. If it makes sense to use another framework 
> besides junit we should standardize with MAPREDUCE-1050. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to