hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r1417673 - in /hadoop/common/branches/branch-1: CHANGES.txt src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
Date Wed, 05 Dec 2012 22:24:06 GMT
Author: sseth
Date: Wed Dec  5 22:24:05 2012
New Revision: 1417673

URL: http://svn.apache.org/viewvc?rev=1417673&view=rev
Log:
MAPREDUCE-4696. Fixed a failing unit test - TestMRServerPorts. (Contributed by Gopal V)

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1417673&r1=1417672&r2=1417673&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Wed Dec  5 22:24:05 2012
@@ -354,6 +354,9 @@ Release 1.1.2 - Unreleased
     MAPREDUCE-4478. Fixed a bug in TaskTracker's heartbeat to keep it under
     control. (Liyin Liang via vinodkv)
 
+    MAPREDUCE-4696. Fixed a failing unit test - TestMRServerPorts
+    (Gopal V via sseth)
+
 Release 1.1.1 - 2012.11.18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java?rev=1417673&r1=1417672&r2=1417673&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
(original)
+++ hadoop/common/branches/branch-1/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
Wed Dec  5 22:24:05 2012
@@ -18,6 +18,8 @@
 package org.apache.hadoop.mapred;
 
 import java.io.IOException;
+import java.util.Date;
+import java.text.SimpleDateFormat;
 import junit.framework.TestCase;
 import org.apache.hadoop.hdfs.TestHDFSServerPorts;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
@@ -62,7 +64,8 @@ public class TestMRServerPorts extends T
     conf.set("mapred.job.tracker.http.address", "0.0.0.0:0");
     JobTracker jt = null;
     try {
-      jt = JobTracker.startTracker(conf);
+      String uniqid = new SimpleDateFormat("yyyyMMddHHmm").format(new Date());
+      jt = JobTracker.startTracker(conf, uniqid, true);
       runner.setJobTracker(jt);
       runner.start();
       conf.set("mapred.job.tracker", "localhost:" + jt.getTrackerPort());
@@ -90,7 +93,8 @@ public class TestMRServerPorts extends T
   throws IOException, InterruptedException {
     JobTracker jt = null;
     try {
-      jt = JobTracker.startTracker(conf);
+      String uniqid = new SimpleDateFormat("yyyyMMddHHmm").format(new Date());
+      jt = JobTracker.startTracker(conf, uniqid, true);
     } catch(IOException e) {
       if (e instanceof java.net.BindException)
         return false;



Mime
View raw message