You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mrunit.apache.org by br...@apache.org on 2012/02/26 18:16:42 UTC

svn commit: r1293877 - in /incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce: TestMapDriver.java TestReduceDriver.java

Author: brock
Date: Sun Feb 26 17:16:41 2012
New Revision: 1293877

URL: http://svn.apache.org/viewvc?rev=1293877&view=rev
Log:
MRUNIT-46: Tests should use *Driver.new*Driver factory methods for cleaner code (patch 2)

Modified:
    incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestMapDriver.java
    incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestReduceDriver.java

Modified: incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestMapDriver.java
URL: http://svn.apache.org/viewvc/incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestMapDriver.java?rev=1293877&r1=1293876&r2=1293877&view=diff
==============================================================================
--- incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestMapDriver.java (original)
+++ incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestMapDriver.java Sun Feb 26 17:16:41 2012
@@ -187,8 +187,7 @@ public class TestMapDriver  {
   public void testConfiguration() {
     Configuration conf = new Configuration();
     conf.set("TestKey", "TestValue");
-    MapDriver<NullWritable, NullWritable, NullWritable, NullWritable> confDriver 
-        = new MapDriver<NullWritable, NullWritable, NullWritable, NullWritable>();
+    MapDriver<NullWritable, NullWritable, NullWritable, NullWritable> confDriver = MapDriver.newMapDriver();
     ConfigurationMapper<NullWritable, NullWritable, NullWritable, NullWritable> mapper 
         = new ConfigurationMapper<NullWritable, NullWritable, NullWritable, NullWritable>();
     confDriver.withMapper(mapper).withConfiguration(conf).

Modified: incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestReduceDriver.java
URL: http://svn.apache.org/viewvc/incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestReduceDriver.java?rev=1293877&r1=1293876&r2=1293877&view=diff
==============================================================================
--- incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestReduceDriver.java (original)
+++ incubator/mrunit/trunk/src/test/java/org/apache/hadoop/mrunit/mapreduce/TestReduceDriver.java Sun Feb 26 17:16:41 2012
@@ -268,7 +268,7 @@ public class TestReduceDriver  {
     Configuration conf = new Configuration();
     conf.set("TestKey", "TestValue");
     ReduceDriver<NullWritable, NullWritable, NullWritable, NullWritable> confDriver 
-        = new ReduceDriver<NullWritable, NullWritable, NullWritable, NullWritable>();
+        = ReduceDriver.newReduceDriver();
     ConfigurationReducer<NullWritable, NullWritable, NullWritable, NullWritable> reducer 
         = new ConfigurationReducer<NullWritable, NullWritable, NullWritable, NullWritable>();
     confDriver.withReducer(reducer).withConfiguration(conf).