[
https://issues.apache.org/jira/browse/LUCENE-3362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080029#comment-13080029
]
Robert Muir commented on LUCENE-3362:
-------------------------------------
Wait, this can't affect 3.3.0.
I didnt add this assert until a couple weeks ago:
https://issues.apache.org/jira/secure/attachment/12487642/SOLR-2673_randomize_methods.patch
> 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.4
> Environment: NetBeans 6.9.1, Maven 2.2.1, Solr 3.3.0
> Reporter: Gérald Quaire
> Priority: Minor
> Labels: maven, tests
>
> 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: [email protected]
For additional commands, e-mail: [email protected]