Forráskód Böngészése

HADOOP-1030. In unit tests, unify setting of ipc.client.timeout. Also increase the value used from one to two seconds.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@510622 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 éve
szülő
commit
43a55468a1

+ 4 - 0
CHANGES.txt

@@ -105,6 +105,10 @@ Trunk (unreleased changes)
 31. HADOOP-564.  Replace uses of "dfs://" URIs with the more standard
     "hdfs://".  (Wendy Chien via cutting)
 
+32. HADOOP-1030.  In unit tests, unify setting of ipc.client.timeout.
+    Also increase the value used from one to two seconds, in hopes of
+    making tests complete more reliably.  (cutting)
+
 
 Release 0.11.2 - 2007-02-16
 

+ 6 - 0
src/test/hadoop-site.xml

@@ -14,6 +14,12 @@
   <description>A base for other temporary directories.</description>
 </property>
 
+<property>
+  <name>ipc.client.timeout</name>
+  <value>2000</value>
+  <description>Decreased value to speed unit tests.</description>
+</property>
+
 <property>
   <name>test.fs.s3.name</name>
   <value>s3:///</value>

+ 0 - 3
src/test/org/apache/hadoop/dfs/MiniDFSCluster.java

@@ -215,9 +215,6 @@ public class MiniDFSCluster {
         new File(base_dir, "name2").getPath());
     conf.setInt("dfs.replication", Math.min(3, nDatanodes));
     conf.setInt("dfs.safemode.extension", 0);
-    // this timeout seems to control the minimum time for the test, so
-    // decrease it considerably.
-    conf.setInt("ipc.client.timeout", 1000);
 
     // Loops until we find ports that work or we give up because 
     // too many tries have failed.

+ 0 - 5
src/test/org/apache/hadoop/ipc/TestRPC.java

@@ -44,11 +44,6 @@ public class TestRPC extends TestCase {
   
   private static Configuration conf = new Configuration();
 
-  // quiet during testing, since output ends up on console
-  static {
-    conf.setInt("ipc.client.timeout", 5000);
-  }
-
   public TestRPC(String name) { super(name); }
 	
   public interface TestProtocol extends VersionedProtocol {

+ 0 - 3
src/test/org/apache/hadoop/mapred/MiniMRCluster.java

@@ -213,9 +213,6 @@ public class MiniMRCluster {
       result.set("fs.default.name", namenode);
       result.set("mapred.job.tracker", "localhost:"+jobTrackerPort);
       result.set("mapred.job.tracker.info.port", jobTrackerInfoPort);
-      // this timeout controls the minimum time for the test, so
-      // set it down at 1 seconds.
-      result.setInt("ipc.client.timeout", 1000);
       // for debugging have all task output sent to the test output
       JobClient.setTaskOutputFilter(result, JobClient.TaskStatusFilter.ALL);
       return result;