فهرست منبع

MAPREDUCE-4697. Fixed a failing unit test - TestMapredHeartbeat. (Contributed by Gopal V)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1417675 13f79535-47bb-0310-9956-ffa450edef68
Siddharth Seth 12 سال پیش
والد
کامیت
86a4e83586
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 3 0
      CHANGES.txt
  2. 2 1
      src/test/org/apache/hadoop/mapred/TestMapredHeartbeat.java

+ 3 - 0
CHANGES.txt

@@ -357,6 +357,9 @@ Release 1.1.2 - Unreleased
     MAPREDUCE-4696. Fixed a failing unit test - TestMRServerPorts
     MAPREDUCE-4696. Fixed a failing unit test - TestMRServerPorts
     (Gopal V via sseth)
     (Gopal V via sseth)
 
 
+    MAPREDUCE-4697. Fixed a failing unit test - TestMapredHeartbeat.
+    (Gopal V via sseth)
+
 Release 1.1.1 - 2012.11.18
 Release 1.1.1 - 2012.11.18
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 2 - 1
src/test/org/apache/hadoop/mapred/TestMapredHeartbeat.java

@@ -58,7 +58,8 @@ public class TestMapredHeartbeat extends TestCase {
       
       
       // test configured heartbeat interval is capped with min value
       // test configured heartbeat interval is capped with min value
       taskTrackers = 5;
       taskTrackers = 5;
-      conf.setInt(JobTracker.JT_HEARTBEATS_IN_SECOND, 10);
+      conf.setInt(JobTracker.JT_HEARTBEATS_IN_SECOND, 
+          (int)Math.ceil((taskTrackers * 1000.0) / MRConstants.HEARTBEAT_INTERVAL_MIN) );
       mr = new MiniMRCluster(taskTrackers, "file:///", 3, 
       mr = new MiniMRCluster(taskTrackers, "file:///", 3, 
           null, null, conf);
           null, null, conf);
       jc = new JobClient(mr.createJobConf());
       jc = new JobClient(mr.createJobConf());