Author: smarthi
Date: Sun Dec 1 23:35:30 2013
New Revision: 1546869
URL: http://svn.apache.org/r1546869
Log:
MAHOUT-1345: Added Carrot Randomized test annotations to base MahoutTestCase to
avoid random Test failures (as suggested by Dawid Weiss).
Modified:
mahout/trunk/CHANGELOG
mahout/trunk/math/pom.xml
mahout/trunk/math/src/test/java/org/apache/mahout/math/MahoutTestCase.java
Modified: mahout/trunk/CHANGELOG
URL:
http://svn.apache.org/viewvc/mahout/trunk/CHANGELOG?rev=1546869&r1=1546868&r2=1546869&view=diff
==============================================================================
--- mahout/trunk/CHANGELOG (original)
+++ mahout/trunk/CHANGELOG Sun Dec 1 23:35:30 2013
@@ -16,7 +16,7 @@ Release 0.9 - unreleased
MAHOUT-1347: Add Streaming K-Means clustering algorithm to
examples/bin/cluster-reuters.sh (smarthi)
- MAHOUT-1345: Enable randomised testing for all Mahout modules (Isabel,
sslavic, Frank Scholten ,smarthi)
+ MAHOUT-1345: Enable randomised testing for all Mahout modules (Dawid Weiss,
Isabel, sslavic, Frank Scholten, smarthi)
MAHOUT-1343: JSON output format support in cluster dumper (Telvis Calhoun
via sslavic)
Modified: mahout/trunk/math/pom.xml
URL:
http://svn.apache.org/viewvc/mahout/trunk/math/pom.xml?rev=1546869&r1=1546868&r2=1546869&view=diff
==============================================================================
--- mahout/trunk/math/pom.xml (original)
+++ mahout/trunk/math/pom.xml Sun Dec 1 23:35:30 2013
@@ -164,6 +164,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-test-framework</artifactId>
+ <version>4.5.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
</dependency>
Modified:
mahout/trunk/math/src/test/java/org/apache/mahout/math/MahoutTestCase.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/math/src/test/java/org/apache/mahout/math/MahoutTestCase.java?rev=1546869&r1=1546868&r2=1546869&view=diff
==============================================================================
--- mahout/trunk/math/src/test/java/org/apache/mahout/math/MahoutTestCase.java
(original)
+++ mahout/trunk/math/src/test/java/org/apache/mahout/math/MahoutTestCase.java
Sun Dec 1 23:35:30 2013
@@ -21,6 +21,12 @@ import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakAction;
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakZombies;
+import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
+import org.apache.lucene.util.TimeUnits;
import org.apache.mahout.common.RandomUtils;
import org.junit.After;
import org.junit.Before;
@@ -30,6 +36,11 @@ import com.carrotsearch.randomizedtestin
/**
* Superclass of all Mahout test cases.
*/
+@ThreadLeakScope(ThreadLeakScope.Scope.SUITE)
+@ThreadLeakAction({ThreadLeakAction.Action.WARN,
ThreadLeakAction.Action.INTERRUPT})
+@ThreadLeakLingering(linger = 20000) // Wait a bit longer for leaked threads
to die.
+@ThreadLeakZombies(ThreadLeakZombies.Consequence.IGNORE_REMAINING_TESTS)
+@TimeoutSuite(millis = 2 * TimeUnits.HOUR)
public abstract class MahoutTestCase extends RandomizedTest {
/** "Close enough" value for floating-point comparisons. */