HDFS-11132. Allow AccessControlException in contract tests when getFileStatus on subdirectory of existing files. Contributed by Vishwajeet Dusane
This commit is contained in:
parent
96c574927a
commit
19f373a46b
|
@ -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,7 +252,13 @@ public abstract class FileContextMainOperationsBaseTest {
|
|||
} catch (IOException e) {
|
||||
// expected
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -260,7 +267,13 @@ public abstract class FileContextMainOperationsBaseTest {
|
|||
} catch (IOException e) {
|
||||
// expected
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
try {
|
||||
assertFalse(fs.exists(testDeepSubDir));
|
||||
} catch (AccessControlException e) {
|
||||
// Expected : HDFS-11132 Checks on paths under file may be rejected by
|
||||
// file missing execute permission.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue