You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2013/02/09 21:01:39 UTC
svn commit: r1444416 - in
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common:
CHANGES.txt src/test/java/org/apache/hadoop/fs/TestListFiles.java
src/test/java/org/apache/hadoop/tools/GetGroupsTestBase.java
Author: suresh
Date: Sat Feb 9 20:01:38 2013
New Revision: 1444416
URL: http://svn.apache.org/r1444416
Log:
HADOOP-9294. Merge 1444415 from trunk
Modified:
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/tools/GetGroupsTestBase.java
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1444416&r1=1444415&r2=1444416&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Sat Feb 9 20:01:38 2013
@@ -9,6 +9,7 @@ Release 2.0.4-beta - UNRELEASED
HADOOP-9283. Add support for running the Hadoop client on AIX. (atm)
IMPROVEMENTS
+
HADOOP-9253. Capture ulimit info in the logs at service start time.
(Arpit Gupta via suresh)
@@ -16,6 +17,8 @@ Release 2.0.4-beta - UNRELEASED
BUG FIXES
+ HADOOP-9294. GetGroupsTestBase fails on Windows. (Chris Nauroth via suresh)
+
Release 2.0.3-alpha - 2013-02-06
INCOMPATIBLE CHANGES
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java?rev=1444416&r1=1444415&r2=1444416&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java Sat Feb 9 20:01:38 2013
@@ -45,19 +45,39 @@ public class TestListFiles {
final protected static Configuration conf = new Configuration();
protected static FileSystem fs;
- final protected static Path TEST_DIR = getTestDir();
+ protected static Path TEST_DIR;
final private static int FILE_LEN = 10;
- final private static Path FILE1 = new Path(TEST_DIR, "file1");
- final private static Path DIR1 = new Path(TEST_DIR, "dir1");
- final private static Path FILE2 = new Path(DIR1, "file2");
- final private static Path FILE3 = new Path(DIR1, "file3");
+ private static Path FILE1;
+ private static Path DIR1;
+ private static Path FILE2;
+ private static Path FILE3;
+
+ static {
+ setTestPaths(new Path(
+ System.getProperty("test.build.data", "build/test/data/work-dir/localfs"),
+ "main_"));
+ }
protected static Path getTestDir() {
- return new Path(
- System.getProperty("test.build.data","build/test/data/work-dir/localfs"),
- "main_");
+ return TEST_DIR;
}
-
+
+ /**
+ * Sets the root testing directory and reinitializes any additional test paths
+ * that are under the root. This method is intended to be called from a
+ * subclass's @BeforeClass method if there is a need to override the testing
+ * directory.
+ *
+ * @param testDir Path root testing directory
+ */
+ protected static void setTestPaths(Path testDir) {
+ TEST_DIR = testDir;
+ FILE1 = new Path(TEST_DIR, "file1");
+ DIR1 = new Path(TEST_DIR, "dir1");
+ FILE2 = new Path(DIR1, "file2");
+ FILE3 = new Path(DIR1, "file3");
+ }
+
@BeforeClass
public static void testSetUp() throws Exception {
fs = FileSystem.getLocal(conf);
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/tools/GetGroupsTestBase.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/tools/GetGroupsTestBase.java?rev=1444416&r1=1444415&r2=1444416&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/tools/GetGroupsTestBase.java (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/tools/GetGroupsTestBase.java Sat Feb 9 20:01:38 2013
@@ -108,7 +108,7 @@ public abstract class GetGroupsTestBase
for (String group : user.getGroupNames()) {
expectedOutput += " " + group;
}
- return expectedOutput + "\n";
+ return expectedOutput + System.getProperty("line.separator");
}
private String runTool(Configuration conf, String[] args, boolean success)