lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gquaire <>
Subject Initialization error of Junit tests with solr-test-framework
Date Thu, 04 Aug 2011 14:20:36 GMT
Hi everybody,

I have a very strange problem. I'm currently developping a new component for
Solr. And in my Netbeans project, I have created two Test classes for this
component: one class for simple unit tests (derived from  SolrTestCaseJ4
class) and a second one for tests with sharding (derived from 
When I launch a test with these two classes, I have an error in the
initialization of the second class of tests (no matter the class is, this is
always the second executed class which fails). The error comes from an
"assert" which failed in the begining of the function "initRandom()" of
LuceneTestCase class :

/assert !random.initialized;/

But, if I launch each test class separatly, all the tests succeed!

To make an experiment, I changed the source code of the LuceneTestCase
function. I replaced the "assert" with a condition:
/if (!random.initialized){ ..}/

With this modification, I lanch the two classes Junit  together and all the
tests succeed.

Does my modification of LuceneTestCase have a sens?

If not, what I do wrong?

Thanks for help!


Jouve ITS France
View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message