[ 
https://issues.apache.org/jira/browse/LUCENE-3362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir updated LUCENE-3362:
--------------------------------

    Attachment: LUCENE-3362.patch

the only good solution given the different workflows these different 
testrunners do, is for the runner to have its own seed.

the problem is that any other solution either gives us non-reproducibility of 
tests, or we must give up the shuffling of test methods... I don't want to do 
either.

patch changes them to hex so the seed values are about as long as they are now 
(nobody cares whats in them, and its all copy-paste anyway).


> 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
>            Assignee: Robert Muir
>            Priority: Minor
>              Labels: maven, tests
>         Attachments: LUCENE-3362.patch
>
>
> 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

Reply via email to