瀏覽代碼

HADOOP-663. Fix a few unit test issues. Contributed by Mahadev.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@470022 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
778d073192

+ 2 - 0
CHANGES.txt

@@ -114,6 +114,8 @@ Trunk (unreleased changes)
 31. HADOOP-660.  Permit specification of junit test output format.
     (Nigel Daley via cutting)
 
+32. HADOOP-663.  Fix a few unit test issues.  (Mahadev Konar via cutting)
+
 
 Release 0.7.2 - 2006-10-18
 

+ 1 - 1
src/contrib/build-contrib.xml

@@ -20,7 +20,7 @@
   <available file="${src.test}" type="dir" property="test.available"/>
 
   <property name="conf.dir" location="${hadoop.root}/conf"/>
-
+  <property name="test.junit.output.format" value="plain"/>
   <property name="build.dir" location="${hadoop.root}/build/contrib/${name}"/>
   <property name="build.classes" location="${build.dir}/classes"/>
   <property name="build.test" location="${build.dir}/test"/>

+ 1 - 1
src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestSymLink.java

@@ -64,7 +64,7 @@ public class TestSymLink extends TestCase
         mr  = new MiniMRCluster(jobTrackerPort, 60060, 1, namenode, true, 3);
         // During tests, the default Configuration will use a local mapred
         // So don't specify -config or -cluster
-        String strJobtracker = "mapred.job.tracker=" + "localhost:" + jobTrackerPort;
+        String strJobtracker = "mapred.job.tracker=" + "localhost:" + mr.getJobTrackerPort();
         String strNamenode = "fs.default.name=" + namenode;
         String argv[] = new String[] {
             "-input", INPUT_FILE,

+ 1 - 1
src/java/org/apache/hadoop/filecache/DistributedCache.java

@@ -125,7 +125,7 @@ public class DistributedCache {
         if (lcacheStatus.refcount == 0) {
           // delete this cache entry
           FileSystem.getNamed("local", conf).delete(lcacheStatus.localLoadPath);
-          cachedArchives.remove(cacheId);
+          it.remove();
         }
       }
     }