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

Haohui Mai commented on HDFS-5695:
----------------------------------

bq. I don't understand why the new version lacks 
TestOfflineEditsViewer#testStored. That seems like it would reduce test 
coverage.

{{testStored}} loads the binary / xml format of the edit logs and checks 
whether the viewer can (1) load the log, and (2) the edit logs contain all 
desired ops. It goes through the exact code path of {{testGenerated}}.

Ideally it is a test for backward compatibility, but in practice we (as 
developers) just replace the stored edit logs with the one generated by 
{{testGenerated}}. This practice has been followed by snapshots, DN cache, and 
ACLs. It seems to me that the test has little value but only requires 
additional work (e.g., HDFS-5636).

For now I think it might be a good time to remove it. We can add a rigorous 
test suite to test the compatibility of edit logs if it is needed.

> Clean up TestOfflineEditsViewer and OfflineEditsViewerHelper
> ------------------------------------------------------------
>
>                 Key: HDFS-5695
>                 URL: https://issues.apache.org/jira/browse/HDFS-5695
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-5695.000.patch
>
>
> TestOfflineEditsViewer and OfflineEditsViewerHelper duplicate some of the 
> functionality available in DFSTestUtil. The code can be simplified.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to