[ 
https://issues.apache.org/jira/browse/LUCENE-3995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256650#comment-13256650
 ] 

Dawid Weiss commented on LUCENE-3995:
-------------------------------------

Robert, this would mean it works fine, right (note dumped randomVal for each 
suite)?
{noformat}
Executing 296 suites with 4 JVMs.
Suite: org.apache.lucene.util.TestCloseableThreadLocal
   > (@BeforeClass output)
  1> randomVal: 9
  1> 

OK      0.05s J1 | TestCloseableThreadLocal.testDefaultValueWithoutSetting
OK      0.01s J1 | TestCloseableThreadLocal.testInitValue
OK      0.01s J1 | TestCloseableThreadLocal.testNullValue
Completed on J1 in 0.27s, 3 tests
 
Suite: org.apache.lucene.util.TestTwoPhaseCommitTool
   > (@BeforeClass output)
  1> randomVal: 6
  1> 

OK      0.04s J2 | TestTwoPhaseCommitTool.testRollback
OK      0.01s J2 | TestTwoPhaseCommitTool.testNullTPCs
OK      0.01s J2 | TestTwoPhaseCommitTool.testWrapper
OK      0.01s J2 | TestTwoPhaseCommitTool.testPrepareThenCommit
Completed on J2 in 0.37s, 4 tests
 
Suite: org.apache.lucene.util.TestNamedSPILoader
   > (@BeforeClass output)
  1> randomVal: 7
  1> 

OK      0.04s J0 | TestNamedSPILoader.testAvailableServices
OK      0.01s J0 | TestNamedSPILoader.testBogusLookup
OK      0.01s J0 | TestNamedSPILoader.testLookup
Completed on J0 in 0.34s, 3 tests
 
Suite: org.apache.lucene.util.TestSmallFloat
   > (@BeforeClass output)
  1> randomVal: 2
  1> 

OK      0.20s J3 | TestSmallFloat.testFloatToByte
OK      0.01s J3 | TestSmallFloat.testByteToFloat
Completed on J3 in 0.48s, 2 tests
 
Suite: org.apache.lucene.index.TestTerm
   > (@BeforeClass output)
  1> randomVal: 0
  1>  
{noformat}
                
> In LuceneTestCase.beforeClass, make a new random (also using the class 
> hashcode) to vary defaults
> -------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3995
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3995
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: general/test
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Dawid Weiss
>
> In LuceneTestCase, we set many static defaults like:
> * default codec
> * default infostream impl
> * default locale
> * default timezone
> * default similarity
> Currently each test run gets a single seed for the run, which means for 
> example across one test run
> every single test will have say, SimpleText + infostream=off + Locale=german 
> + timezone=EDT + similarity=BM25
> Because of that, we lose lots of basic mixed coverage across tests, and it 
> also means the unfortunate
> individual who gets SimpleText or other slow options gets a REALLY SLOW test 
> run, rather than amortizing
> this across all test runs.
> We should at least make a new random (getRandom() ^ className.hashCode()) to 
> fix this so it works like before,
> but unfortunately that only fixes it for LuceneTestCase.
> Won't any subclasses that make random decisions in @BeforeClass (and we have 
> many) still have the same problem?
> Maybe RandomizedRunner can instead be improved here?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]

Reply via email to