You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2012/10/05 23:22:03 UTC
[jira] [Created] (LUCENE-4463) add support for running the same
test method many times
Robert Muir created LUCENE-4463:
-----------------------------------
Summary: add support for running the same test method many times
Key: LUCENE-4463
URL: https://issues.apache.org/jira/browse/LUCENE-4463
Project: Lucene - Core
Issue Type: Wish
Components: general/build
Reporter: Robert Muir
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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4463) add support for running the same
test method many times
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-4463:
----------------------------------
Attachment: LUCENE-4463.patch
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470993#comment-13470993 ]
Michael McCandless commented on LUCENE-4463:
--------------------------------------------
bq. Yeah, I'm sure Mike will stick to his SSH scripts though
Not if we had an efficient way to distribute tests across N JVMs running on M machines from a single queue.
One big problem w/ runRemoteTests.py is it does CLASSPATH pollution, ie the CLASSPATH it runs with is the union of all CLASSPATHs for all tests ... this is bad because then it fails to catch dependency problems, or cases when module X shouldn't use module Y but does. This also causes certain tests to false fail ...
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470936#comment-13470936 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
{quote}
if you can settle for reusing the same JVM, tests.iters combined with testmethod (or tests.method=...*) will give you different test seeds everytime – only the global seed will be the same
{quote}
Right, we can't really settle for that for Lucene's tests. Thats because things like Codec are set at class level, so i could run this 100000000000000 times and press commit and watch it fail because jenkins gets a different codec. And we have a lot of these, and only more being added.
Its a tradeoff, sure we could set Codec per-writer e.g. in our newIndexWriterConfig instead of per-test-class, but I think it makes debugging much simpler to look at it as a "parameterized-test-class" at this level of Codec apis maturity so we can easily see which one the test got when it failed.
So really we need a different per-class seed too: same as you would get when doing 'ant test' in a loop with an inefficient shell script.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470690#comment-13470690 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
There are two use cases:
1. you have a seed: CAFE0000:DEADBEEF from the "reproduce-with" but it doesnt reproduce well. so you want to run that method like 1000 times.
2. you want a new seed each time, because you sense there might be bugs out there that you don't yet know about.
I think in this case i had #2 in mind, but maybe this test.dups works for #1? I havent tried this yet.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470937#comment-13470937 ]
Dawid Weiss commented on LUCENE-4463:
-------------------------------------
Let me start from the beginning. I talked about it once but I can't find it now.
1. testmethod vs. "tests.method"
The reason for the complication in "testmethod" vs. "tests.method" is stemming from how JUnit works. A "test description" must (in practice) be unique, otherwise tools just go crazy. So to make a test repeat, its name must be made unique. That's why if you do tests.iters=X every repetition of a single test method will in fact be named uniquely as:
testMethod {#seq seed=[...]}
These are not things just added to the report, this is a "method name" as JUnit Description object sees it. It's odd but it's a workaround that works and that is (as far as I'm concerned) the only one possible.
So when you use "-Dtestname=X" this is an alias for "-Dtests.method=X" which will filter out all these repeated tests (because effectively they don't match the mattern). In order to include them, you need to add a glob like: "-Dtests.method=X*". Hoss and I added this to the test-help to make it clear(er) a while back.
2. Seeds and tests.dup
The "master" test seed is passed to <junit4> task once and it just stays there. Everything else is derived from it. The "duplication" you see is a simple trick -- we just duplicate the file name on input. Because every suite gets the same random seed (mixed with its class name to make it more random across a single run), a duplicated identical suite will still get the same master seed every time.
This option was meant for accelerating a test scenario in which we want to repeat a single suite/seed combination many times and want to do it using multiple parallel JVMs.
3. What Robert wants (across-jvm repetition of a single suite with a different seed each time).
Is effectively impossible right now without re-spinning <junit4> with a different seed each time.
I don't see I could marry all this into working with both the scenario above and with Robert wants although I admit both are useful. A script (loop) doing an antcall would work but this seems like an overkill. Fixing this at JUnit4 level isn't trivial either because the seed is currently picked even before junit4 is started (to select the target charset).
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470738#comment-13470738 ]
Uwe Schindler commented on LUCENE-4463:
---------------------------------------
Oh patch seems obsolete, tests.dups is enough...
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470678#comment-13470678 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
Here is my current script, just so you see:
{noformat}
#!/bin/bash
> /home/rmuir/log.txt
x=0
while [ $x -lt 1000 ]
do
echo "test iteration number $x"
ant test -Dtestcase=TestFoo -Dtests.method=testBar >> /home/rmuir/log.txt 2>&1
x=$(( $x + 1 ))
done
{noformat}
I edit this every time i need to use it and then just use 'grep -i failed log.txt' to look for failures.
one problem is it fires up ant, calls resolve,compile,compile-tests all this stuff each time. this makes it really slow.
so if it could work from ant directly i think it would be much more efficient.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470943#comment-13470943 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
I know its not easy: thats why its a "wish" task :)
I guess I'm just basically listing what could be seen as an expert feature here, but arguably necessary if you are trying to do randomized tests.
The fact is that things dont always reproduce 100%, and you know this is definitely a failure in our tests (e.g. the current situation motivated
me to open LUCENE-4460). But really part of random testing is you know, you dont have to try to write targeted tests but just throw hardware
at the problem (which I'm doing... my office is really hot right now!).
The frustrating part is I think ideally you want to basically treat this whole randomized test situation like a normal deterministic unit test, you know
like a normal developer would have, so you know you fixed the bug, even if the test isn't great and doesnt reproduce 100%, you want to know its really
fixed rather than taking blind stabs, waiting to see if all the computers in your house running full throttle will trip a bug in 24 hours to declare success :)
So I'm just basically opening this "wish" task to try to think of ways to make this easier and more efficient.
I'd actually go so far to say the tests.iters is really outdated for lucene's tests these days (since we have so much class-level "parameterization"
and we should be focusing on this tests.dups (and maybe removing the tests.iters totally). Maybe thats just particular to us though, but as I mentioned
above I think we show some real use cases for parameterizing the entire test class with certain things because it simplifies debugging.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470991#comment-13470991 ]
Michael McCandless commented on LUCENE-4463:
--------------------------------------------
The "scatter tests across a bunch of networked machines" script is here: http://code.google.com/a/apache-extras.org/p/luceneutil/source/browse/runRemoteTests.py ... it just uses randomizedrunner to execute the tests, but ssh to distribute each test case to the N machines. All JVMs (N per remote machine) pull from a single shared tasks queue, in order of slowest test to fastest test ... it communicates with randomizedrunner using its nice stdin/.events "API" :)
It runs [nearly!] all Lucene/Solr tests across N machines and reports any failures ... the source code is scary and has hardwired constants for my env ... but it makes running all tests wicked fast.
But that's a very different use case than "beasting a single test" (this issue). For that I use http://code.google.com/a/apache-extras.org/p/luceneutil/source/browse/repeatLuceneTest.py ... however, it's single threaded, and does not run on remote machines ... would be fun to fix that!
bq. He should install Jenkins on his farmhouse machine and then setup a slave
Well I think we need to solve this issue first (how to run many iters of a single testcase & testmethod, each w/ a different seed)? Then I agree Jenkins could be used for distribution instead of ssh + scripts.
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470672#comment-13470672 ]
Uwe Schindler commented on LUCENE-4463:
---------------------------------------
As discussed in GTalk, we can do this with a simple groovy script again. I will think about it, should be 6 lines of code.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470940#comment-13470940 ]
Dawid Weiss commented on LUCENE-4463:
-------------------------------------
I have two ideas but they both have shortcomings -- I could make tests.dups run with different seed for each suite but they'd be the same sequence _on each forked JVM_ (add a static field to the current class-name-mixer and just mix with the repetition of the same suite name). An alternative is to modify junit4 and do the same, but then to allow both the same seed and different seed each (different scenarios) we'd need... yet another -D option :)
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Assigned] (LUCENE-4463) add support for running the same
test method many times
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Weiss reassigned LUCENE-4463:
-----------------------------------
Assignee: Dawid Weiss
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4463) add support for running the same
test method many times
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-4463:
----------------------------------
Attachment: (was: LUCENE-4463.patch)
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470741#comment-13470741 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
{quote}
Oh patch seems obsolete, tests.dups is enough...
{quote}
Its not enough yet: because as Dawid says, each time you run it, it currently gets the same seed.
This is what i want to see if we can workaround :)
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470739#comment-13470739 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
{quote}
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.
{quote}
{noformat}
test:
[junit4:junit4] <JUnit4> says cześć! Master seed: 968CB4DA24E595DE
[junit4:junit4] Executing 10 suites with 4 JVMs.
[junit4:junit4]
[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]
[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]
[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
...
{noformat}
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: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Weiss updated LUCENE-4463:
--------------------------------
Summary: Add support for running the same test method/class many times with different class seeds (was: add support for running the same test method many times)
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470681#comment-13470681 ]
Dawid Weiss 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.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4463) add support for running the same
test method many times
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-4463:
----------------------------------
Attachment: LUCENE-4463.patch
Here is a trivial patch doing this (it uses a for-loop of <antcall/>). The reason why doing this is:
- The naive approach is to simple use project.executeTarget(), but on the second run of the same target, junit4 complains about properties set from the previous run.
- This approach unfortunately runs all dependencies over and over, as <antcall/> internally creates a "sub-project", inherits all properties currently set and then executes the target in this isolated environment. No way around that :(
- This patch works everywhere where you can call "ant test" (except top-level as it does not import common-build.xml.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470694#comment-13470694 ]
Hoss Man commented on LUCENE-4463:
----------------------------------
Just to be clear...
bq. the -Dtests.iters is not really useful for this because it does not allow -Dtestmethod and it does not give a fresh jvm.
-Dtests.iters definitely works with -Dtestmethod.
from test-help...
{noformat}
[echo] # Repeats a given test N times (note the filters - individual test
[echo] # repetitions are given suffixes, ie: testFoo[0], testFoo[1], etc...
[echo] # so using testmethod or tests.method ending in a glob is necessary
[echo] # to ensure iterations are run).
[echo] ant test -Dtests.iters=N -Dtestcase=ClassName -Dtestmethod=mytest
[echo] ant test -Dtests.iters=N -Dtestcase=ClassName -Dtests.method=mytest*
[echo]
[echo] # Repeats N times but skips any tests after the first failure or M
[echo] # initial failures.
[echo] ant test -Dtests.iters=N -Dtests.failfast=yes -Dtestcase=...
[echo] ant test -Dtests.iters=N -Dtests.maxfailures=M -Dtestcase=...
{noformat}
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470736#comment-13470736 ]
Uwe Schindler commented on LUCENE-4463:
---------------------------------------
bq. I'll take the (hard to reproduce seed) from http://sierranevada.servebeer.com/job/lucene40-beaster/1327/consoleText, and add -Dtests.iters=100 to it:
This is the same I get with the simple script using project.executeTarget()
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470725#comment-13470725 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
Just to be clear...
It really doesnt.
I'll take the (hard to reproduce seed) from http://sierranevada.servebeer.com/job/lucene40-beaster/1327/consoleText, and add -Dtests.iters=100 to it:
{noformat}
BUILD FAILED
/home/rmuir/workspace/lucene_solr_4_0/lucene/build.xml:49: The following error occurred while executing this line:
/home/rmuir/workspace/lucene_solr_4_0/lucene/common-build.xml:1142: The following error occurred while executing this line:
/home/rmuir/workspace/lucene_solr_4_0/lucene/common-build.xml:756: You are attempting to use 'tests.iters' in combination with a 'tests.method' value with does not end in a '*' -- This combination makes no sense, because the 'tests.method' filter will be unable to match the synthetic test names generated by the multiple iterations.
Total time: 2 seconds
{noformat}
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470980#comment-13470980 ]
Dawid Weiss commented on LUCENE-4463:
-------------------------------------
Yeah, I'm sure Mike will stick to his SSH scripts though :)
Anyway, my first idea won't work. The seed decorator has to have a constant mix function for a given class -- it cannot change over time for the same time because then you wouldn't know the actual seed (and be able to repeat it) if a failure happened at iteration > 1.
I'll try with my second idea which requires modification to the runner. The problem again is that this involves a longer cycle of releasing via maven, etc.
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470746#comment-13470746 ]
Hoss Man commented on LUCENE-4463:
----------------------------------
bq. I'll take the (hard to reproduce seed) from http://sierranevada.servebeer.com/job/lucene40-beaster/1327/consoleText, and add -Dtests.iters=100 to it:
you said "because it does not allow -Dtestmethod" i said "-Dtests.iters definitely works with -Dtestmethod." ... the reproduce line noted in the url you mentioned doesn't use "-Dtestmethod" -- it uses "-Dtests.method" which is why you get the helpful error that you need to add a "*" to that in order to use tests.iters (which is also what it said in the test-help output i pasted)
if you can settle for reusing the same JVM, tests.iters combined with testmethod (or tests.method=...*) will give you different _test_ seeds everytime -- only the global seed will be the same
{noformat}
hossman@frisbee:~/lucene/dev/lucene/core$ ant test -Dtestcase=TestDemo -Dtestmethod=testDemo -Dtests.iters=100
...
test:
[mkdir] Created dir: /home/hossman/lucene/dev/lucene/build/core/test
[junit4:junit4] <JUnit4> says ¡Hola! Master seed: 22F7073C01E2726A
[junit4:junit4] Executing 1 suite with 1 JVM.
[junit4:junit4]
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK 0.26s | TestDemo.testDemo {#0 seed=[22F7073C01E2726A:5D5BBB89303F587A]}
[junit4:junit4] OK 0.02s | TestDemo.testDemo {#1 seed=[22F7073C01E2726A:E90D077504FD9356]}
[junit4:junit4] OK 0.02s | TestDemo.testDemo {#2 seed=[22F7073C01E2726A:67E491A95539DB9D]}
[junit4:junit4] OK 0.02s | TestDemo.testDemo {#3 seed=[22F7073C01E2726A:560A3A4C39C780B4]}
...
[junit4:junit4] OK 0.01s | TestDemo.testDemo {#97 seed=[22F7073C01E2726A:350464D9D520F10D]}
[junit4:junit4] OK 0.06s | TestDemo.testDemo {#98 seed=[22F7073C01E2726A:F13956B54576EE0E]}
[junit4:junit4] OK 0.01s | TestDemo.testDemo {#99 seed=[22F7073C01E2726A:3BAD13CC4232331D]}
[junit4:junit4] Completed in 3.28s, 100 tests
[junit4:junit4]
[junit4:junit4] JVM J0: 0.49 .. 4.34 = 3.85s
[junit4:junit4] Execution time total: 4.34 sec.
[junit4:junit4] Tests summary: 1 suite, 100 tests
{noformat}
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470976#comment-13470976 ]
Uwe Schindler commented on LUCENE-4463:
---------------------------------------
bq. Btw. I don't think there's anything I can do to make Mike NOT run his Python/SSH magic because he scatters tests across a farm of machines... I plan to do this for junit4 around year 2020, he, he. Not that it's very complicated technically but it'd require a lot of refactorings and then testing for potential infrastructure problems, detecting hung processes/sockets/jvms, etc.
I dont think you need to do that: He should install Jenkins on his farmhouse machine and then setup a slave in the GUI for every combine harvester operated by his slaves. He can then create a job, not bound to a specific node and run it on all slaves in parallel. Very easy to setup, the SSH-Magic is included in Jenkins ("dumb slave "): Jenkins connects via SSH to the slave, copies the slave.jar via scp and starts the jenkins cows. On the dairies you don’t need to setup anything beyond a VM in $PATH.
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470946#comment-13470946 ]
Robert Muir commented on LUCENE-4463:
-------------------------------------
And just to give a little more background, I mean the stuff we are dealing with is really crazy in some sense.
You don't see the normal jenkins servers emitting failures: what happened is we realized we weren't really testing XYZ
that we thought we were testing for months: I'm trying to help make up for lost time :(
So all these failures you have seen this week have been typically nasty-to-debug hard-to-reproduce long-tail failures
that would normally take a ton of time to show up: Its just been Mike debugging and fixing and me trying to figure
out more ways to provoke these failures in a more efficient way, like good-cop/bad-cop
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471090#comment-13471090 ]
Dawid Weiss commented on LUCENE-4463:
-------------------------------------
I thought about it for a bit longer and exercised a few scenarios. The problem is that I designed everything (and I mean everything) with two ideas in mind:
- every random element (be it a selection of components, shuffling of order or whatever) is a derivative of a single "master" seed. This seed is picked by <junit4> task and is then used to sort suites to be executed, pick parameters, then is passed to suites to log messages, stack traces, etc.
- execution of a test suite (in the sense of a single class) is isolated from anything else -- any other class running before or after. So you can provide the same master seed for a single class and it should execute identically, even if it's detached from the entire sequence of suites than ran during the full test. The "seed decorators" that we currently use alter the master seed with a hash of the test class's name to make it different for each class running under the same master seed, but this is an independent operation -- whether something ran before or after doesn't matter.
The idea of running the same suite many times with a _different_ master seed each time conflicts with these assumptions because then every subsequent execution of the same class will _not_ be a derivative of the master seed anymore (and will most likely depend on how many classes executed before or even be random).
Let me illustrate this on an example. Let's say the master seed is XXX; we use this seed to pick file.encoding and for this seed it becomes UTF-8. If we now pick a random master seed (say, YYY) for concrete class and it fails, it'll report YYY back to the console. But if you ant -Dtests.seed=YYY then the selection of file.encoding will be different because, ehm, it's not XXX anymore. file.encoding has to be picked before the JVM is started so it cannot be done from within the running test runner, etc.
This is just one of the problem scenarios, there are more but I hope you get the picture.
A "clean" solution to the problem would be to make a loop inside ant, around the contents of the test-macro (so that the entire sequence of picking the master seed, picking parameters, spawning JVMs, etc. is repeated). This isn't really going to make matters much faster because it'll fork new JVMs etc.
A "dirty" solution is to screw the above idealistic point of view and have a seed decorator which affects the master seed before it is propagated to each suite. This will cause all the headaches mentioned above PLUS you'll have to get the failing seed directly from the failing test (stack trace or whatever other message is printed) because it won't be the master seed JUnit4 greets you with. Then you could indeed run as many concurrent instances of the same suite with random seeds as you like (JVMs reused). This does sound like super-advanced and convoluted piece of functionality for something that will be probably used pretty frequently (which means lots of wtfs on the mailing list).
Don't know, really.
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) add support for running the same
test method many times
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470975#comment-13470975 ]
Dawid Weiss commented on LUCENE-4463:
-------------------------------------
I absolutely understand. There seem to be a few recurring scenarios:
- random test (exploring the combinations space; typically jenkins)
- random test, many repetitions of a single test method, constant seed (-Dtestcase=... -Dtests.iters=... -Dtests.seed=XXX:YYY)
- random test, many repetitions of a single test method, variable seed starting from a single master (-Dtestcase=... -Dtests.iters=... -Dtests.seed=XXX)
- random test, many repetitions of a single suite, constant seed (-Dtestcase=... -Dtests.dups=... -Dtests.seed=...); this also applies for repeating a single test method within a suite but accelerated to run on multiple cores if one has many.
- random test, many repetitions of a single suite, random seed (-Dtestcase=... -Dtests.dups=...).
We currently seem to have all these except for the last one. I have a working patch in my head, I'll attach shortly.
Btw. I don't think there's anything I can do to make Mike NOT run his Python/SSH magic because he scatters tests across a farm of machines... I plan to do this for junit4 around year 2020, he, he. Not that it's very complicated technically but it'd require a lot of refactorings and then testing for potential infrastructure problems, detecting hung processes/sockets/jvms, etc.
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4463) Add support for running the same
test method/class many times with different class seeds
Posted by "Dawid Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471005#comment-13471005 ]
Dawid Weiss commented on LUCENE-4463:
-------------------------------------
bq. Not if we had an efficient way to distribute tests across N JVMs running on M machines from a single queue.
Yeah... I'll try to fix this issue so that you can run across N JVMs, but still locally. I don't think I'll have the time in the nearest future to work on truly distributed mode.
> Add support for running the same test method/class many times with different class seeds
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Assignee: Dawid Weiss
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org