mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Re: Random Errors
Date Sun, 09 Jun 2013 12:47:46 GMT
I get a failure on the one below when running in parallel, but not standalone: 

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 10.358 sec <<< FAILURE!
testRun(org.apache.mahout.text.SequenceFilesFromLuceneStorageMRJobTest)  Time elapsed: 10.358
sec  <<< FAILURE!
java.lang.AssertionError: expected:<2002> but was:<0>
	at org.junit.Assert.failNotEquals(
	at org.junit.Assert.assertEquals(
	at org.junit.Assert.assertEquals(
	at org.junit.Assert.assertEquals(
	at org.apache.mahout.text.SequenceFilesFromLuceneStorageMRJobTest.testRun(

Interesting thing about this one is the Test class has only a single test and it has no randomization.

FWIW, it's also becoming increasingly clear to me that we need some notion of real integration
tests that we can run against a Hadoop cluster (or at least a virtual Hadoop cluster).


On Jun 8, 2013, at 9:38 AM, Dawid Weiss <> wrote:

>> number generators. Where a test depends on a particular sequence, and
>> somewhere an RNG doesn't use the "RandomUtils" trick, it may have a
>> different state if other tests ran before.
> I have a different solution for this in randomizedtesting framework (a
> Random instance cannot be shared from test to test, it will throw an
> exception if you do share it). This doesn't solve all the possible
> problems but proved quite effective at catching test dependencies.
>> The surefire parameter just controls what order the *classes* run in AFAICT:
> Yeah, I was on the train when I wrote that e-mail. The trick I
> remembered is in fact inside JUnit 4.11 and onwards --
> D.

Grant Ingersoll | @gsingers

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message