You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Konstantin Boudnik (JIRA)" <ji...@apache.org> on 2009/11/19 03:32:39 UTC
[jira] Commented: (HDFS-520) Create new tests for block recovery
[ https://issues.apache.org/jira/browse/HDFS-520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779804#action_12779804 ]
Konstantin Boudnik commented on HDFS-520:
-----------------------------------------
I've spent quite some time doing some refactoring of the Datanode code to make it more testable. It seems to be possible to master some tests with Mockito. However, they look more like end-to-end test eventually, because of high complexity of dependencies in the code. E.g. mocking of the datanode requires to spy on NameNode (i.e. actually initialize it) because there some calls between these two; then an actual files need to be added or proper blocks mocked and inserted to cover particular executed paths; and so on.
Which forced me to take a look at the current coverage situation of Datanode class. To my surprise I've discovered that {{recoverBlock()}} is pretty much well covered (except for some error conditions processing); {{syncBlock()}} looks even better. {{FsNameSysmtem.commitBlockSynchronization()}} seems to be Ok as well. It means that existing tests are covering this new functionality in a pretty decent fashion.
I'd suggest to drop these tests. For real.
> Create new tests for block recovery
> -----------------------------------
>
> Key: HDFS-520
> URL: https://issues.apache.org/jira/browse/HDFS-520
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: test
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
>
> According to the test plan a number of new features are going to be implemented as a part of this umbrella (HDFS-265) JIRA.
> These new features are have to be tested properly. Block recovery is one of new functionality which require new tests to be developed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.