Browse Source

MAPREDUCE-4792. Unit Test TestJobTrackerRestartWithLostTracker fails with ant-1.8.4. Contributed by Amir Sanjar.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1411073 13f79535-47bb-0310-9956-ffa450edef68
Matthew Foley 12 years ago
parent
commit
db2df1779e

+ 5 - 3
CHANGES.txt

@@ -315,9 +315,6 @@ Release 1.2.0 - unreleased
 
 
     HDFS-4180. Update TestFileCreation for HDFS-4122.  (Jing Zhao via szetszwo)
     HDFS-4180. Update TestFileCreation for HDFS-4122.  (Jing Zhao via szetszwo)
 
 
-    HDFS-4105. the SPNEGO user for secondary namenode should use the web 
-    keytab. (Arpit Gupta via jitendra)
-
     HADOOP-9036. Fix racy test case TestSinkQueue (Backport HADOOP-7292).
     HADOOP-9036. Fix racy test case TestSinkQueue (Backport HADOOP-7292).
     (Luke Lu backport by suresh)
     (Luke Lu backport by suresh)
 
 
@@ -372,6 +369,11 @@ Release 1.1.1 - Unreleased
     HADOOP-9017. Fix hadoop-client-pom-template.xml and
     HADOOP-9017. Fix hadoop-client-pom-template.xml and
     hadoop-client-pom-template.xml for version token ( gkesavan )
     hadoop-client-pom-template.xml for version token ( gkesavan )
 
 
+    HDFS-4105. the SPNEGO user for secondary namenode should use the web 
+    keytab. (Arpit Gupta via jitendra)
+
+    MAPREDUCE-4792. Unit Test TestJobTrackerRestartWithLostTracker fails 
+    with ant-1.8.4. (Amir Sanjar via mattf)
 
 
 Release 1.1.0 - 2012.09.28
 Release 1.1.0 - 2012.09.28
 
 

+ 8 - 5
src/test/org/apache/hadoop/mapred/TestJobTrackerRestartWithLostTracker.java

@@ -17,21 +17,24 @@
  */
  */
 package org.apache.hadoop.mapred;
 package org.apache.hadoop.mapred;
 
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.*;
 import org.apache.hadoop.fs.*;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.hadoop.mapred.TestJobTrackerRestart;
+import org.junit.Test;
+
 
 
-import junit.framework.TestCase;
 import java.io.*;
 import java.io.*;
-import org.junit.*;
+
 
 
 /** 
 /** 
  * This test checks if the jobtracker can detect and recover a tracker that was
  * This test checks if the jobtracker can detect and recover a tracker that was
  * lost while the jobtracker was down.
  * lost while the jobtracker was down.
  */
  */
 
 
-public class TestJobTrackerRestartWithLostTracker extends TestCase {
+public class TestJobTrackerRestartWithLostTracker {
   final Path testDir = new Path("/jt-restart-lost-tt-testing");
   final Path testDir = new Path("/jt-restart-lost-tt-testing");
   final Path inDir = new Path(testDir, "input");
   final Path inDir = new Path(testDir, "input");
   final Path shareDir = new Path(testDir, "share");
   final Path shareDir = new Path(testDir, "share");
@@ -114,7 +117,7 @@ public class TestJobTrackerRestartWithLostTracker extends TestCase {
 
 
     assertTrue("Job should be successful", rJob.isSuccessful());
     assertTrue("Job should be successful", rJob.isSuccessful());
   }
   }
-  
+  @Test
   public void testRestartWithLostTracker() throws IOException {
   public void testRestartWithLostTracker() throws IOException {
     String namenode = null;
     String namenode = null;
     MiniDFSCluster dfs = null;
     MiniDFSCluster dfs = null;