From 834e2ddbab095247372c3e566abdef1713234b1f Mon Sep 17 00:00:00 2001 From: Mingliang Liu Date: Tue, 22 Nov 2016 14:27:23 -0800 Subject: [PATCH] HADOOP-13166. Add getFileStatus("/") test to AbstractContractGetFileStatusTest. Contributed by Steve Loughran (cherry picked from commit 2bf9a15e8a1ac92923b45130c3369720d4a76fe1) --- .../fs/contract/AbstractContractGetFileStatusTest.java | 6 ++++++ 1 file changed, 6 insertions(+) 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");