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 2011/06/08 21:51:59 UTC
[jira] [Created] (LUCENE-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
----------------------------------------------------
Key: LUCENE-3184
URL: https://issues.apache.org/jira/browse/LUCENE-3184
Project: Lucene - Java
Issue Type: Test
Reporter: Robert Muir
Fix For: 3.3, 4.0
in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
also, we found some bugs by doing this, because in general our parameters are too fixed.
however, it made the code look messy... I propose some new methods:
instead of some crazy code in your test like:
{code}
int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
{code}
you use:
{code}
int numdocs = atLeast(100);
{code}
this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
additionally instead of code like:
{code}
if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
{code}
you do
{code}
if (rarely()) {
{code}
which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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] [Resolved] (LUCENE-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Robert Muir (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir resolved LUCENE-3184.
---------------------------------
Resolution: Fixed
I think uwe's reported problems are fixed
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048515#comment-13048515 ]
Uwe Schindler commented on LUCENE-3184:
---------------------------------------
All OOMs are related to FST usage (mostly the one with the big file and lots of iterations):
- org.apache.lucene.util.fst.TestFSTs.testBigSet
but also:
- org.apache.lucene.index.TestPerFieldCodecSupport.testStressPerFieldCodec
- org.apache.lucene.search.TestPhraseQuery.testRandomPhrases
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048517#comment-13048517 ]
Uwe Schindler commented on LUCENE-3184:
---------------------------------------
I have also to note, that the tests now take horribly long in nightly. One build took 2 hrs and was finally failing at testBigSet. So it was not even running module/contrib tests, it took 2hrs for test-core in Lucene. Clover did also not run, but it does *not* use nightly or more than one iteration.
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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] [Resolved] (LUCENE-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir resolved LUCENE-3184.
---------------------------------
Resolution: Fixed
we can fix the remaining tests to use this stuff as we get around to them.
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3184:
--------------------------------
Attachment: LUCENE-3184.patch
here's a patch, also includes some random speedups to some of these tests.
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046172#comment-13046172 ]
Michael McCandless commented on LUCENE-3184:
--------------------------------------------
Looks great! I love the LTC.rarely, usually, atLeast methods :)
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-3184:
---------------------------------------
Fix Version/s: (was: 3.4)
3.5
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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] [Reopened] (LUCENE-3184) add
LuceneTestCase.rarely()/LuceneTestCase.atLeast()
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler reopened LUCENE-3184:
-----------------------------------
There are some problems now in nightly builds with OOMs (boith 3.x and trunk). We can do either:
- reduce some nightly settings
- raise -Xmx if nightly=true, maybe dependent on number of iterations, too?
> add LuceneTestCase.rarely()/LuceneTestCase.atLeast()
> ----------------------------------------------------
>
> Key: LUCENE-3184
> URL: https://issues.apache.org/jira/browse/LUCENE-3184
> Project: Lucene - Java
> Issue Type: Test
> Reporter: Robert Muir
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3184.patch
>
>
> in LUCENE-3175, the tests were sped up a lot by using reasonable number of iterations normally, but cranking up for NIGHTLY.
> we also do crazy things more 'rarely' for normal builds (e.g. simpletext, payloads, crazy merge params, etc)
> also, we found some bugs by doing this, because in general our parameters are too fixed.
> however, it made the code look messy... I propose some new methods:
> instead of some crazy code in your test like:
> {code}
> int numdocs = (TEST_NIGHTLY ? 1000 : 100) * RANDOM_MULTIPLIER;
> {code}
> you use:
> {code}
> int numdocs = atLeast(100);
> {code}
> this will apply the multiplier, also factor in nightly, and finally add some random fudge... so e.g. in local runs its sometimes 127 docs, sometimes 113 docs, etc.
> additionally instead of code like:
> {code}
> if ((TEST_NIGHTLY && random.nextBoolean()) || (random.nextInt(20) == 17)) {
> {code}
> you do
> {code}
> if (rarely()) {
> {code}
> which applies NIGHTLY and also the multiplier (logarithmic growth).
--
This message is automatically generated by JIRA.
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