Browse Source

Merge -r 704702:704703 from trunk to branch-0.19 to fix HADOOP-4378.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19@704705 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 16 years ago
parent
commit
ad8ebf9aea
2 changed files with 10 additions and 3 deletions
  1. 3 0
      CHANGES.txt
  2. 7 3
      src/test/org/apache/hadoop/mapred/TestJobQueueInformation.java

+ 3 - 0
CHANGES.txt

@@ -854,6 +854,9 @@ Release 0.19.0 - Unreleased
     HADOOP-4403. Make TestLeaseRecovery and TestFileCreation more robust.
     HADOOP-4403. Make TestLeaseRecovery and TestFileCreation more robust.
     (szetszwo)
     (szetszwo)
 
 
+    HADOOP-4378. Fix TestJobQueueInformation to use SleepJob rather than
+    WordCount via TestMiniMRWithDFS. (Sreekanth Ramakrishnan via acmurthy) 
+
 Release 0.18.2 - Unreleased
 Release 0.18.2 - Unreleased
 
 
   BUG FIXES
   BUG FIXES

+ 7 - 3
src/test/org/apache/hadoop/mapred/TestJobQueueInformation.java

@@ -28,6 +28,7 @@ import javax.security.auth.login.LoginException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.examples.SleepJob;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.ipc.RPC;
 import org.apache.hadoop.ipc.RPC;
 import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.net.NetUtils;
@@ -87,7 +88,11 @@ public class TestJobQueueInformation extends TestCase {
     assertNotNull(queueInfos);
     assertNotNull(queueInfos);
     assertEquals(1, queueInfos.length);
     assertEquals(1, queueInfos.length);
     assertEquals("default", queueInfos[0].getQueueName());
     assertEquals("default", queueInfos[0].getQueueName());
-    TestMiniMRWithDFS.runWordCount(mrCluster, mrCluster.createJobConf());
+    JobConf conf = mrCluster.createJobConf();
+    SleepJob sleepJob = new SleepJob();
+    sleepJob.setConf(conf);
+    conf = sleepJob.setupJobConf(4, 2, 1, 1, 1, 1);
+    JobClient.runJob(conf);
     int numberOfJobs = 0;
     int numberOfJobs = 0;
 
 
     for (JobQueueInfo queueInfo : queueInfos) {
     for (JobQueueInfo queueInfo : queueInfos) {
@@ -101,7 +106,6 @@ public class TestJobQueueInformation extends TestCase {
         assertEquals(JOB_SCHEDULING_INFO, status.getSchedulingInfo());
         assertEquals(JOB_SCHEDULING_INFO, status.getSchedulingInfo());
       }
       }
     }
     }
-    // Three jobs are launched by runwordcount
-    assertEquals(3, numberOfJobs);
+    assertEquals(1, numberOfJobs);
   }
   }
 }
 }