hadoop git commit: HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane
Repository: hadoop Updated Branches: refs/heads/branch-2.8 c7b6e0dd6 -> e792f1671 HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane (cherry picked from commit 19f373a46b2abb7a575f7884a9c7443b8ed67cd3) Conflicts: hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e792f167 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e792f167 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e792f167 Branch: refs/heads/branch-2.8 Commit: e792f1671df5c5a6f57eec9a399cf2d4dbb1ee31 Parents: c7b6e0d Author: John ZhugeAuthored: Mon Mar 20 21:29:17 2017 -0700 Committer: John Zhuge Committed: Mon Mar 20 21:29:17 2017 -0700 -- .../fs/FileContextMainOperationsBaseTest.java | 21 .../hadoop/fs/FileSystemContractBaseTest.java | 21 2 files changed, 34 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e792f167/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java index 6058577..9728cdf 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java @@ -29,6 +29,7 @@ import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.fs.Options.CreateOpts; import org.apache.hadoop.fs.Options.Rename; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.test.GenericTestUtils; import org.junit.After; import org.junit.Assert; @@ -251,8 +252,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testSubDir)); - + +try { + Assert.assertFalse(exists(fc, testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir"); try { fc.mkdir(testDeepSubDir, FsPermission.getDefault(), true); @@ -260,8 +267,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testDeepSubDir)); - + +try { + Assert.assertFalse(exists(fc, testDeepSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + } @Test http://git-wip-us.apache.org/repos/asf/hadoop/blob/e792f167/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java index 757370e5..2a16799 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java @@ -28,6 +28,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; /** * @@ -137,8 +138,14 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testSubDir)); - + +try { + assertFalse(fs.exists(testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = path("/test/hadoop/file/deep/sub/dir"); try { fs.mkdirs(testDeepSubDir); @@ -146,8
hadoop git commit: HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane
Repository: hadoop Updated Branches: refs/heads/branch-2 69f34e812 -> 2c5de0c60 HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane (cherry picked from commit 19f373a46b2abb7a575f7884a9c7443b8ed67cd3) Conflicts: hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2c5de0c6 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2c5de0c6 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2c5de0c6 Branch: refs/heads/branch-2 Commit: 2c5de0c60ebbd03a3cd6e6d6c6c827f44e3c42ee Parents: 69f34e8 Author: John ZhugeAuthored: Mon Mar 20 11:31:57 2017 -0700 Committer: John Zhuge Committed: Mon Mar 20 21:16:50 2017 -0700 -- .../fs/FileContextMainOperationsBaseTest.java | 21 .../hadoop/fs/FileSystemContractBaseTest.java | 21 2 files changed, 34 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2c5de0c6/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java index 5f9151a..2b3ab2a 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java @@ -29,6 +29,7 @@ import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.fs.Options.CreateOpts; import org.apache.hadoop.fs.Options.Rename; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.test.GenericTestUtils; import org.junit.After; import org.junit.Assert; @@ -251,8 +252,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testSubDir)); - + +try { + Assert.assertFalse(exists(fc, testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir"); try { fc.mkdir(testDeepSubDir, FsPermission.getDefault(), true); @@ -260,8 +267,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testDeepSubDir)); - + +try { + Assert.assertFalse(exists(fc, testDeepSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + } @Test http://git-wip-us.apache.org/repos/asf/hadoop/blob/2c5de0c6/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java index 4159582..a776a89 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; /** * @@ -187,8 +188,14 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testSubDir)); - + +try { + assertFalse(fs.exists(testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = path( "testMkdirsFailsForSubdirectoryOfExistingFile/file/deep/sub/dir"); try { @@ -197,8 +204,14 @@ public abstract class
[17/29] hadoop git commit: HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane
HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/19f373a4 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/19f373a4 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/19f373a4 Branch: refs/heads/YARN-5734 Commit: 19f373a46b2abb7a575f7884a9c7443b8ed67cd3 Parents: 96c5749 Author: Mingliang LiuAuthored: Thu Dec 1 12:54:03 2016 -0800 Committer: Mingliang Liu Committed: Thu Dec 1 12:54:28 2016 -0800 -- .../fs/FileContextMainOperationsBaseTest.java | 21 .../hadoop/fs/FileSystemContractBaseTest.java | 17 ++-- 2 files changed, 32 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/19f373a4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java index 5f9151a..2b3ab2a 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java @@ -29,6 +29,7 @@ import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.fs.Options.CreateOpts; import org.apache.hadoop.fs.Options.Rename; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.test.GenericTestUtils; import org.junit.After; import org.junit.Assert; @@ -251,8 +252,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testSubDir)); - + +try { + Assert.assertFalse(exists(fc, testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir"); try { fc.mkdir(testDeepSubDir, FsPermission.getDefault(), true); @@ -260,8 +267,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testDeepSubDir)); - + +try { + Assert.assertFalse(exists(fc, testDeepSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + } @Test http://git-wip-us.apache.org/repos/asf/hadoop/blob/19f373a4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java index bbd7336..6247959 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java @@ -28,6 +28,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.util.StringUtils; /** @@ -158,7 +159,13 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testSubDir)); + +try { + assertFalse(fs.exists(testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} Path testDeepSubDir = path("/test/hadoop/file/deep/sub/dir"); try { @@ -167,7 +174,13 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testDeepSubDir)); + +try { + assertFalse(fs.exists(testDeepSubDir)); +} catch (AccessControlException e) { +
[22/24] hadoop git commit: HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane
HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/19f373a4 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/19f373a4 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/19f373a4 Branch: refs/heads/YARN-5085 Commit: 19f373a46b2abb7a575f7884a9c7443b8ed67cd3 Parents: 96c5749 Author: Mingliang LiuAuthored: Thu Dec 1 12:54:03 2016 -0800 Committer: Mingliang Liu Committed: Thu Dec 1 12:54:28 2016 -0800 -- .../fs/FileContextMainOperationsBaseTest.java | 21 .../hadoop/fs/FileSystemContractBaseTest.java | 17 ++-- 2 files changed, 32 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/19f373a4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java index 5f9151a..2b3ab2a 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java @@ -29,6 +29,7 @@ import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.fs.Options.CreateOpts; import org.apache.hadoop.fs.Options.Rename; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.test.GenericTestUtils; import org.junit.After; import org.junit.Assert; @@ -251,8 +252,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testSubDir)); - + +try { + Assert.assertFalse(exists(fc, testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir"); try { fc.mkdir(testDeepSubDir, FsPermission.getDefault(), true); @@ -260,8 +267,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testDeepSubDir)); - + +try { + Assert.assertFalse(exists(fc, testDeepSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + } @Test http://git-wip-us.apache.org/repos/asf/hadoop/blob/19f373a4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java index bbd7336..6247959 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java @@ -28,6 +28,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.util.StringUtils; /** @@ -158,7 +159,13 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testSubDir)); + +try { + assertFalse(fs.exists(testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} Path testDeepSubDir = path("/test/hadoop/file/deep/sub/dir"); try { @@ -167,7 +174,13 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testDeepSubDir)); + +try { + assertFalse(fs.exists(testDeepSubDir)); +} catch (AccessControlException e) { +
hadoop git commit: HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane
Repository: hadoop Updated Branches: refs/heads/trunk 96c574927 -> 19f373a46 HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/19f373a4 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/19f373a4 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/19f373a4 Branch: refs/heads/trunk Commit: 19f373a46b2abb7a575f7884a9c7443b8ed67cd3 Parents: 96c5749 Author: Mingliang LiuAuthored: Thu Dec 1 12:54:03 2016 -0800 Committer: Mingliang Liu Committed: Thu Dec 1 12:54:28 2016 -0800 -- .../fs/FileContextMainOperationsBaseTest.java | 21 .../hadoop/fs/FileSystemContractBaseTest.java | 17 ++-- 2 files changed, 32 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/19f373a4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java index 5f9151a..2b3ab2a 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java @@ -29,6 +29,7 @@ import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.fs.Options.CreateOpts; import org.apache.hadoop.fs.Options.Rename; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.test.GenericTestUtils; import org.junit.After; import org.junit.Assert; @@ -251,8 +252,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testSubDir)); - + +try { + Assert.assertFalse(exists(fc, testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + Path testDeepSubDir = getTestRootPath(fc, "test/hadoop/file/deep/sub/dir"); try { fc.mkdir(testDeepSubDir, FsPermission.getDefault(), true); @@ -260,8 +267,14 @@ public abstract class FileContextMainOperationsBaseTest { } catch (IOException e) { // expected } -Assert.assertFalse(exists(fc, testDeepSubDir)); - + +try { + Assert.assertFalse(exists(fc, testDeepSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} + } @Test http://git-wip-us.apache.org/repos/asf/hadoop/blob/19f373a4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java index bbd7336..6247959 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemContractBaseTest.java @@ -28,6 +28,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.util.StringUtils; /** @@ -158,7 +159,13 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testSubDir)); + +try { + assertFalse(fs.exists(testSubDir)); +} catch (AccessControlException e) { + // Expected : HDFS-11132 Checks on paths under file may be rejected by + // file missing execute permission. +} Path testDeepSubDir = path("/test/hadoop/file/deep/sub/dir"); try { @@ -167,7 +174,13 @@ public abstract class FileSystemContractBaseTest extends TestCase { } catch (IOException e) { // expected } -assertFalse(fs.exists(testDeepSubDir)); + +try { +