From 1911172730d3221b6dce8e15e3b282158df373eb Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Thu, 15 Nov 2012 18:15:57 +0000 Subject: [PATCH] Revert HADOOP-9042. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1409903 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 --- .../hadoop/fs/FileSystemContractBaseTest.java | 21 ------------------- 2 files changed, 24 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 9401dd5dd31..e756c2ab4e2 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -81,9 +81,6 @@ Release 2.0.3-alpha - Unreleased HADOO-8998. set Cache-Control no-cache header on all dynamic content. (tucu) - HADOOP-9042. Add a test for umask in FileSystemContractBaseTest. - (Colin Patrick McCabe via eli) - OPTIMIZATIONS HADOOP-8866. SampleQuantiles#query is O(N^2) instead of O(N). (Andrew Wang 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 4979462ccc9..94c4b0c31fa 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 @@ -23,13 +23,11 @@ import java.io.IOException; import junit.framework.TestCase; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.fs.permission.FsPermission; /** *

@@ -153,25 +151,6 @@ public abstract class FileSystemContractBaseTest extends TestCase { assertFalse(fs.exists(testDeepSubDir)); } - - public void testMkdirsWithUmask() throws Exception { - if (fs.getScheme().equals("s3") || fs.getScheme().equals("s3n")) { - // skip permission tests for S3FileSystem until HDFS-1333 is fixed. - return; - } - Configuration conf = fs.getConf(); - String oldUmask = conf.get(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY); - try { - conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "062"); - final Path dir = new Path("/test/newDir"); - assertTrue(fs.mkdirs(dir, new FsPermission((short)0777))); - FileStatus status = fs.getFileStatus(dir); - assertTrue(status.isDirectory()); - assertEquals((short)0715, status.getPermission().toShort()); - } finally { - conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, oldUmask); - } - } public void testGetFileStatusThrowsExceptionForNonExistentFile() throws Exception {