diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java index c68c1930e78..269e35ea669 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractGetFileStatusTest.java @@ -72,6 +72,12 @@ public abstract class AbstractContractGetFileStatusTest extends } } + @Test + public void testGetFileStatusRoot() throws Throwable { + ContractTestUtils.assertIsDirectory( + getFileSystem().getFileStatus(new Path("/"))); + } + @Test public void testListStatusEmptyDirectory() throws IOException { describe("List status on an empty directory");