Author: sslavic
Date: Tue Sep 17 18:47:23 2013
New Revision: 1524173
URL: http://svn.apache.org/r1524173
Log:
MAHOUT-1337: Made tests deterministic by using test seed
Modified:
mahout/trunk/core/src/test/java/org/apache/mahout/math/neighborhood/SearchSanityTest.java
Modified:
mahout/trunk/core/src/test/java/org/apache/mahout/math/neighborhood/SearchSanityTest.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/neighborhood/SearchSanityTest.java?rev=1524173&r1=1524172&r2=1524173&view=diff
==============================================================================
---
mahout/trunk/core/src/test/java/org/apache/mahout/math/neighborhood/SearchSanityTest.java
(original)
+++
mahout/trunk/core/src/test/java/org/apache/mahout/math/neighborhood/SearchSanityTest.java
Tue Sep 17 18:47:23 2013
@@ -22,7 +22,9 @@ import java.util.List;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
+
import org.apache.mahout.common.MahoutTestCase;
+import org.apache.mahout.common.RandomUtils;
import org.apache.mahout.common.distance.EuclideanDistanceMeasure;
import org.apache.mahout.math.DenseMatrix;
import org.apache.mahout.math.DenseVector;
@@ -57,6 +59,7 @@ public class SearchSanityTest extends Ma
@Parameterized.Parameters
public static List<Object[]> generateData() {
+ RandomUtils.useTestSeed();
Matrix dataPoints = multiNormalRandomData(NUM_DATA_POINTS, NUM_DIMENSIONS);
return Arrays.asList(new Object[][]{
{new ProjectionSearch(new EuclideanDistanceMeasure(), NUM_PROJECTIONS,
SEARCH_SIZE), dataPoints},