You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2013/07/03 21:28:21 UTC

[jira] [Commented] (HADOOP-9361) Strictly define the expected behavior of filesystem APIs and write tests to verify compliance

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

Steve Loughran commented on HADOOP-9361:
----------------------------------------

This is my first prototype of a contract-driven FS test suite. Every FS has to implement AbstractFSContract, which provides an FS factory, test working dir and report whether various options are supported (and eventually, limits). Options include things like {{supports-unix-permissions}} and {{is-case-sensitive}}, as well as test options like {{root-tests-enabled}} -that being a flag which, if set, enables tests to do things to a root dir like renaming and deleting it.

There is a contract for Local FS, which fail because the seek operations of local don't quite follow the expectations of HADOOP-9495, which is something to consider. That FS contract dynamically chooses case sensitivity and unix-permissions features based on the OS it is running.
                
> Strictly define the expected behavior of filesystem APIs and write tests to verify compliance
> ---------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9361
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9361
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs, test
>    Affects Versions: 3.0.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>         Attachments: HADOOP-9361-001.patch
>
>
> {{FileSystem}} and {{FileContract}} aren't tested rigorously enough -while HDFS gets tested downstream, other filesystems, such as blobstore bindings, don't.
> The only tests that are common are those of {{FileSystemContractTestBase}}, which HADOOP-9258 shows is incomplete.
> I propose 
> # writing more tests which clarify expected behavior
> # testing operations in the interface being in their own JUnit4 test classes, instead of one big test suite. 
> # Having each FS declare via a properties file what behaviors they offer, such as atomic-rename, atomic-delete, umask, immediate-consistency -test methods can downgrade to skipped test cases if a feature is missing.

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