Author: ddas
Date: Tue Sep  1 17:30:18 2009
New Revision: 810136

URL: http://svn.apache.org/viewvc?rev=810136&view=rev
Log:
MAPREDUCE-924. Fixes the TestPipes testcase to use Tool. Contributed by 
Amareshwari Sriramadasu.

Modified:
    hadoop/common/branches/branch-0.20/CHANGES.txt
    
hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java

Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=810136&r1=810135&r2=810136&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Tue Sep  1 17:30:18 2009
@@ -253,6 +253,9 @@
     MAPREDUCE-687. Fix an assertion in TestMiniMRMapRedDebugScript.
     (Amareshwari Sriramadasu via sharad)
 
+    MAPREDUCE-924. Fixes the TestPipes testcase to use Tool.
+    (Amareshwari Sriramadasu via sharad)
+
 Release 0.20.0 - 2009-04-15
 
   INCOMPATIBLE CHANGES

Modified: 
hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java?rev=810136&r1=810135&r2=810136&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
 (original)
+++ 
hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
 Tue Sep  1 17:30:18 2009
@@ -40,6 +40,7 @@
 import org.apache.hadoop.mapred.TestMiniMRWithDFS;
 import org.apache.hadoop.mapred.Counters.Counter;
 import org.apache.hadoop.util.StringUtils;
+import org.apache.hadoop.util.ToolRunner;
 
 import junit.framework.TestCase;
 
@@ -238,12 +239,14 @@
                        " -program " + 
                        dfs.getFileSystem().makeQualified(wordExec));
     try {
-      Submitter.main(new String[]{"-conf", jobXml.toString(),
+      int ret = ToolRunner.run(new Submitter(),
+                               new String[]{"-conf", jobXml.toString(),
                                   "-input", inDir.toString(),
                                   "-output", outDir.toString(),
                                   "-program", 
                         dfs.getFileSystem().makeQualified(wordExec).toString(),
                                   "-reduces", "2"});
+      assertEquals(0, ret);
     } catch (Exception e) {
       assertTrue("got exception: " + StringUtils.stringifyException(e), false);
     }


Reply via email to