Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
3.0.0-alpha1
-
None
-
fixed in
HADOOP-9258
Description
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.
Attachments
Issue Links
- Is contained by
-
HADOOP-9258 Add stricter tests to FileSystemContractTestBase
- Closed
- is related to
-
HADOOP-13518 backport HADOOP-9258 to branch-2
- Resolved