Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DE184D91 for ; Wed, 8 Jun 2011 19:54:23 +0000 (UTC) Received: (qmail 77086 invoked by uid 500); 8 Jun 2011 19:54:20 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 76976 invoked by uid 500); 8 Jun 2011 19:54:20 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 76854 invoked by uid 99); 8 Jun 2011 19:54:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 19:54:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 19:54:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6F89D108245 for ; Wed, 8 Jun 2011 19:53:59 +0000 (UTC) Date: Wed, 8 Jun 2011 19:53:59 +0000 (UTC) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Message-ID: <1479809367.4382.1307562839453.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1401037185.4371.1307562719577.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3184) add LuceneTestCase.rarely()/LuceneTestCase.atLeast() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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