Initialization error of Junit tests with solr-test-framework with IDEs and Maven --------------------------------------------------------------------------------
Key: LUCENE-3362 URL: https://issues.apache.org/jira/browse/LUCENE-3362 Project: Lucene - Java Issue Type: Bug Components: general/test Affects Versions: 3.3 Environment: NetBeans 6.9.1, Maven 2.2.1, Solr 3.3.0 Reporter: Gérald Quaire Priority: Minor 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 BaseDistributedSearchTestCase). 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! After a discussion with Mr. Muir, the problems seems to be related to the incompatibility of the class LuceneTestCase with the functioning of Maven projects in IDEs. According to mister Muir: " The problem is that via ant, tests work like this (e.g. for 3 test classes): computeTestMethods beforeClass afterClass computeTestMethods beforeClass AfterClass computeTestMethods beforeClass afterClass but via an IDE, if you run it from a folder like you did, then it does this: computeTestMethods computeTestMethods computeTestMethods beforeClass afterClass beforeClass afterClass beforeClass afterClass " -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org