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 AF3E2D38B for ; Wed, 5 Sep 2012 10:04:10 +0000 (UTC) Received: (qmail 44397 invoked by uid 500); 5 Sep 2012 10:04:09 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 44186 invoked by uid 500); 5 Sep 2012 10:04:09 -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 44156 invoked by uid 99); 5 Sep 2012 10:04:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 10:04:08 +0000 Date: Wed, 5 Sep 2012 21:04:08 +1100 (NCT) From: "Dawid Weiss (JIRA)" To: dev@lucene.apache.org Message-ID: <1211140982.38186.1346839448129.JavaMail.jiratomcat@arcas> In-Reply-To: <438399093.34497.1346787608887.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (LUCENE-4360) Support running the same test suite multiple times in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4360?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D134= 48606#comment-13448606 ]=20 Dawid Weiss commented on LUCENE-4360: ------------------------------------- Example of use: {code} ant test-core -Dtests.dups=3D3 -Dtestcase=3DTestCharFilter says kaixo! Master seed: 4CE0022F3CDFF5D7 Your default console's encoding may not display certain unicode glyphs: win= dows-1252 Executing 3 suites with 3 JVMs. Suite: org.apache.lucene.analysis.TestCharFilter OK 0.05s J1 | TestCharFilter.testCharFilter1 OK 0.01s J1 | TestCharFilter.testCharFilter11 OK 0.00s J1 | TestCharFilter.testCharFilter2 OK 0.00s J1 | TestCharFilter.testCharFilter12 Completed on J1 in 0.35s, 4 tests Suite: org.apache.lucene.analysis.TestCharFilter OK 0.04s J2 | TestCharFilter.testCharFilter1 OK 0.01s J2 | TestCharFilter.testCharFilter11 OK 0.00s J2 | TestCharFilter.testCharFilter2 OK 0.01s J2 | TestCharFilter.testCharFilter12 Completed on J2 in 0.35s, 4 tests Suite: org.apache.lucene.analysis.TestCharFilter OK 0.04s J0 | TestCharFilter.testCharFilter1 OK 0.02s J0 | TestCharFilter.testCharFilter11 OK 0.00s J0 | TestCharFilter.testCharFilter2 OK 0.00s J0 | TestCharFilter.testCharFilter12 Completed on J0 in 0.36s, 4 tests JVM J0: 0.67 .. 1.56 =3D 0.89s JVM J1: 0.67 .. 1.55 =3D 0.88s JVM J2: 0.67 .. 1.57 =3D 0.90s Execution time total: 1.58 sec. Tests summary: 3 suites, 12 tests {code} In combination with tests.iters: {code} ant test-core -Dtests.dups=3D2 -Dtests.iters=3D2 -Dtestcase=3DTestCharFilte= r says =C3=ADHola! Master seed: 592442048D98540B Your default console's encoding may not display certain unicode glyphs: win= dows-1252 Executing 2 suites with 2 JVMs. Suite: org.apache.lucene.analysis.TestCharFilter OK 0.04s J1 | TestCharFilter.testCharFilter12 {#0 seed=3D[592442048D98= 540B:5E8780464DC70845]} OK 0.00s J1 | TestCharFilter.testCharFilter12 {#1 seed=3D[592442048D98= 540B:EAD13CBA7905C369]} OK 0.00s J1 | TestCharFilter.testCharFilter11 {#0 seed=3D[592442048D98= 540B:4AC9FEB2457325F4]} OK 0.00s J1 | TestCharFilter.testCharFilter11 {#1 seed=3D[592442048D98= 540B:FE9F424E71B1EED8]} OK 0.00s J1 | TestCharFilter.testCharFilter1 {#0 seed=3D[592442048D985= 40B:643276B2D133E783]} OK 0.00s J1 | TestCharFilter.testCharFilter1 {#1 seed=3D[592442048D985= 40B:D064CA4EE5F12CAF]} OK 0.00s J1 | TestCharFilter.testCharFilter2 {#0 seed=3D[592442048D985= 40B:D339FCA65F87D49C]} OK 0.01s J1 | TestCharFilter.testCharFilter2 {#1 seed=3D[592442048D985= 40B:676F405A6B451FB0]} Completed on J1 in 0.34s, 8 tests Suite: org.apache.lucene.analysis.TestCharFilter OK 0.05s J0 | TestCharFilter.testCharFilter12 {#0 seed=3D[592442048D98= 540B:5E8780464DC70845]} OK 0.00s J0 | TestCharFilter.testCharFilter12 {#1 seed=3D[592442048D98= 540B:EAD13CBA7905C369]} OK 0.00s J0 | TestCharFilter.testCharFilter11 {#0 seed=3D[592442048D98= 540B:4AC9FEB2457325F4]} OK 0.00s J0 | TestCharFilter.testCharFilter11 {#1 seed=3D[592442048D98= 540B:FE9F424E71B1EED8]} OK 0.00s J0 | TestCharFilter.testCharFilter1 {#0 seed=3D[592442048D985= 40B:643276B2D133E783]} OK 0.00s J0 | TestCharFilter.testCharFilter1 {#1 seed=3D[592442048D985= 40B:D064CA4EE5F12CAF]} OK 0.00s J0 | TestCharFilter.testCharFilter2 {#0 seed=3D[592442048D985= 40B:D339FCA65F87D49C]} OK 0.00s J0 | TestCharFilter.testCharFilter2 {#1 seed=3D[592442048D985= 40B:676F405A6B451FB0]} Completed on J0 in 0.35s, 8 tests JVM J0: 0.66 .. 1.49 =3D 0.82s JVM J1: 0.66 .. 1.28 =3D 0.62s Execution time total: 1.49 sec. Tests summary: 2 suites, 16 tests {code} Note each JVM will start from the same master seed. Each test will work in = its own working directory and JVM though so it can be useful for performin= g stress testing of a single suite. =20 > Support running the same test suite multiple times in parallel > -------------------------------------------------------------- > > Key: LUCENE-4360 > URL: https://issues.apache.org/jira/browse/LUCENE-4360 > Project: Lucene - Core > Issue Type: New Feature > Components: general/test > Reporter: Dawid Weiss > Assignee: Dawid Weiss > Priority: Trivial > Fix For: 5.0, 4.0 > > Attachments: quickhack.patch > > > The current "test execution multiplier" or: > {code} > -Dtests.iters=3DN > {code} > generates multiple tests (method executions) under a test class (suite). = All these tests, however, are bound to a single class so they must run sequ= entially and on a single JVM (because of how JUnit works -- nesting of rule= s, class hooks, etc.). > Mark pointed out that if somebody has a multi-core CPU then it'd be nice = to be able to run a single suite in parallel, possibly in combination with = tests.iters (so that a single test method is executed X times on Y parallel= JVMs). > This is surprisingly easy with the randomized runner because it currently= accepts "duplicate" suite names and will load-balance them in a normal way= . So, if one has Y cores (JVMs) then providing a suite name X times will re= sult in X executions, balanced across Y JVMs. > The only problem is how to "multiply" suite names. This can be done in a = number of ways, starting from a custom resource collection wrapper and endi= ng at a built-in code in the runner itself. I think the custom collection w= rapper approach would be interesting, I'll explore this direction. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs 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