mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smar...@apache.org
Subject svn commit: r1568731 - /mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/Step1MapperTest.java
Date Sun, 16 Feb 2014 06:52:47 GMT
Author: smarthi
Date: Sun Feb 16 06:52:47 2014
New Revision: 1568731

URL: http://svn.apache.org/r1568731
Log:
MAHOUT-1417: changed EasyMock.createMock() to EasyMock.createNiceMock() to suppress assertion
failure.

Modified:
    mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/Step1MapperTest.java

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/Step1MapperTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/Step1MapperTest.java?rev=1568731&r1=1568730&r2=1568731&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/Step1MapperTest.java
(original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/Step1MapperTest.java
Sun Feb 16 06:52:47 2014
@@ -100,7 +100,6 @@ public final class Step1MapperTest exten
   @SuppressWarnings({ "rawtypes", "unchecked" })
   @Test
   public void testMapper() throws Exception {
-    Long seed = null;
     Random rng = RandomUtils.getRandom();
 
     // prepare the data
@@ -124,14 +123,14 @@ public final class Step1MapperTest exten
       // expected number of trees that this mapper will build
       int mapNbTrees = Step1Mapper.nbTrees(NUM_MAPPERS, NUM_TREES, partition);
 
-      Mapper.Context context = EasyMock.createMock(Mapper.Context.class);
+      Mapper.Context context = EasyMock.createNiceMock(Mapper.Context.class);
       Capture<TreeID> capturedKeys = new TreeIDCapture();
       context.write(EasyMock.capture(capturedKeys), EasyMock.anyObject());
       EasyMock.expectLastCall().anyTimes();
 
       EasyMock.replay(context);
 
-      MockStep1Mapper mapper = new MockStep1Mapper(treeBuilder, dataset, seed,
+      MockStep1Mapper mapper = new MockStep1Mapper(treeBuilder, dataset, null,
           partition, NUM_MAPPERS, NUM_TREES);
 
       // make sure the mapper computed firstTreeId correctly



Mime
View raw message