lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4463) add support for running the same test method many times
Date Fri, 05 Oct 2012 22:36:02 GMT


Robert Muir commented on LUCENE-4463:

you can do:

ant test -Dtests.dups=100 -Dtestcase=XXXX -Dtestmethod=YYYY

It will respin the suite/test 100 times. The global starting seed will be identical for each
suite though (because they have exactly the same name). If you want different seeds each time
there is no way to do this other than re-running the task (junit4) 100 times using a script
or something.

[junit4:junit4] <JUnit4> says cześć! Master seed: 968CB4DA24E595DE
[junit4:junit4] Executing 10 suites with 4 JVMs.
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK      0.54s J3 | TestDemo.testDemo
[junit4:junit4] Completed on J3 in 1.09s, 1 test
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK      0.50s J2 | TestDemo.testDemo
[junit4:junit4] Completed on J2 in 1.05s, 1 test
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK      0.46s J0 | TestDemo.testDemo
[junit4:junit4] Completed on J0 in 0.98s, 1 test

This is really cool and fast especially since it gets multiple threads. I wish there was a
way to get different seeds each time: 
what do you mean when you say each suite has exactly the same name? Could there be an option
that somehow wraps each suite
with a "fake name" (e.g. TestDemo-1, TestDemo-2) to trick it into getting different ones?
> add support for running the same test method many times
> -------------------------------------------------------
>                 Key: LUCENE-4463
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Wish
>          Components: general/build
>            Reporter: Robert Muir
>         Attachments: LUCENE-4463.patch
> I have a shell script for this, mike has a python script, its annoying :)
> I want to do something like this:
> ant beast -Dtestcase=XXXX -Dtestmethod=YYYY -Diterations=100
> I would be happy with a simple loop that just invokes 'test' somehow: getting a fresh
new JVM to each iteration is desirable anyway (so you get fresh codecs, etc). 
> the -Dtests.iters is not really useful for this because it does not allow -Dtestmethod
and it does not give a fresh jvm.
> bonus points if it can use multiple jvms at the same time though :)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message