Author: suresh
Date: Sat Jan 5 04:26:15 2013
New Revision: 1429199
URL: http://svn.apache.org/viewvc?rev=1429199&view=rev
Log:
HADOOP-9179. TestFileSystem fails with open JDK7. Contributed by Brandon Li.
Modified:
hadoop/common/branches/branch-1/CHANGES.txt
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/fs/TestFileSystem.java
Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1429199&r1=1429198&r2=1429199&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Sat Jan 5 04:26:15 2013
@@ -393,6 +393,8 @@ Release 1.2.0 - unreleased
HDFS-4358. TestCheckpoint failure with JDK7. (Arpit Agarwal via suresh)
+ HADOOP-9179. TestFileSystem fails with open JDK7. (Brandon Li via suresh)
+
Release 1.1.2 - Unreleased
INCOMPATIBLE CHANGES
Modified:
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/fs/TestFileSystem.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/test/org/apache/hadoop/fs/TestFileSystem.java?rev=1429199&r1=1429198&r2=1429199&view=diff
==============================================================================
---
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/fs/TestFileSystem.java
(original)
+++
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/fs/TestFileSystem.java
Sat Jan 5 04:26:15 2013
@@ -19,6 +19,12 @@
package org.apache.hadoop.fs;
import static org.mockito.Mockito.mock;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
import java.io.DataInputStream;
import java.io.IOException;
@@ -35,8 +41,6 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
-import junit.framework.TestCase;
-
import org.apache.commons.logging.Log;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
@@ -65,9 +69,10 @@ import org.apache.hadoop.security.UserGr
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.security.token.TokenIdentifier;
import org.apache.hadoop.util.Progressable;
+import org.junit.BeforeClass;
import org.junit.Test;
-public class TestFileSystem extends TestCase {
+public class TestFileSystem {
private static final Log LOG = FileSystem.LOG;
private static Configuration conf = new Configuration();
@@ -82,6 +87,11 @@ public class TestFileSystem extends Test
private static Path READ_DIR = new Path(ROOT, "fs_read");
private static Path DATA_DIR = new Path(ROOT, "fs_data");
+ @BeforeClass
+ public static void initialize() throws Exception {
+ NetUtilsTestResolver.install();
+ }
+
public void testFs() throws Exception {
testFs(10 * MEGA, 100, 0);
}