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

Dawid Weiss commented on LUCENE-6194:
-------------------------------------

Yes, this is correct behavior. The "second" part of the seed is derived from 
(the first part + iteration number). Note, however, that if you provide both 
parts and run multiple iterations then all of the iterations will be repeated 
with exactly the same randomness.

This behavior is useful to detect non-deterministic tests. Note the difference 
-- if your test fails some iterations with:

{code}
-Dtests.seed=dead -Dtests.iters=100
{code}

it means for "certain" seeds (at certain iterations) the code is failing, while 
if your test case fails intermittently on:

{code}
-Dtests.seed=dead:beef -Dtests.iters=100
{code}

then there is something non-related to the randomness that is causing the 
failure for a particular seed (dead:beef).

Technically the first segment applies to static context (randomness) and the 
second segment applies to any instance-level context (randomness).


> Reproduce with should include -Dtests.iters=N
> ---------------------------------------------
>
>                 Key: LUCENE-6194
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6194
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/test-framework
>            Reporter: Michael McCandless
>            Priority: Minor
>
> I was playing with the patch on LUCENE-6066, and hit a test failure, but then 
> the "Reproduce with: " failed to reproduce, which threw me for a bit of a 
> loop, until I realized it was missing the -Dtests.iters=N.
> To see this, apply the patch on LUCENE-6066 to trunk and then run this:
> {noformat}
> ant test  -Dtestcase=TestPriorityQueue 
> -Dtests.method=testRemovalsAndInsertions* -Dtests.seed=2576D26D551748E5 
> -Dtests.slow=true 
> -Dtests.linedocsfile=/lucenedata/hudson.enwiki.random.lines.txt 
> -Dtests.locale=ru_RU -Dtests.timezone=Europe/Paris -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8 -Dtests.iters=10
> {noformat}
> (or just insert a random test failure into e.g. TestDemo or something).
> It should fail, but the "Reproduce with: ..." line does not include 
> -Dtests.iters=10.  I think it should?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to