Steve Loughran created HADOOP-9227:
--------------------------------------
Summary: FileSystemContractBaseTest doesn't test filesystem's
mkdir/isDirectory() logic rigorously enough
Key: HADOOP-9227
URL: https://issues.apache.org/jira/browse/HADOOP-9227
Project: Hadoop Common
Issue Type: Improvement
Components: fs
Affects Versions: 3.0.0
Reporter: Steve Loughran
Priority: Trivial
The {{FileSystemContractBaseTest.mkdirs()}} asserts that a newly created
directory is true, but way of {{FileStatus.isFile()}}, but doesn't assert that
the directory is a dir by way of {{FileStatus.isDir()}}.
The assertion used is slightly weaker, as the {{isFile()}} test is actually
{{!isdir && !isSymlink()}}. if an implementation of {{FileSystem.mkdirs()}}
created symlinks then the test would still pass.
There is one test that looks at the {{isDirectory()}} logic,
{{testMkdirsWithUmask()}} -but as that test is skipped for the s3 filesystems,
it is possible for those filesystems (or similar) to not have their directory
creation logic stressed enough.
The fix would be a trivial single line.
--
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