Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 15765 invoked from network); 12 Apr 2010 12:38:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Apr 2010 12:38:05 -0000 Received: (qmail 73734 invoked by uid 500); 12 Apr 2010 12:38:03 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 73623 invoked by uid 500); 12 Apr 2010 12:38:03 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 73216 invoked by uid 99); 12 Apr 2010 12:38:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 12:38:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kristian.rosenvold@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 12:37:55 +0000 Received: by fg-out-1718.google.com with SMTP id e12so1255390fga.6 for ; Mon, 12 Apr 2010 05:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=mb7fsWlkDb3xZhOAon5PCRc7SJXcgSnMh33oaf44U94=; b=ebXn36kJKo3z8DS0MNMu0AkD8Ybwy6qEZEaJY107Z37qrZ0sQ2wxEpYexy9aRkk7OW i1qmopr0CeoMFANJSRNLltYKWYThLyxuMhmILLS21MGCcF0Vni1yvWzpG+PA/4mA3MDs IgkAEL1bFKZRLE/BB8xET8N5vR8n54Ay0R4sE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=l6scta9YuKkKev4stCUIYluc6d/fmhxPTXq7TjFKaBH2MblK6uMWvU+AmhXOfFOHEh JWqzzLgUa4KCSrJoFSFFRXPiEm1g2V9jHPiJYUSohafEr6NVmk78YRXpnL7AZG2whFWb 499wModg7WcTKGlV07CVPDZWbiU0rVSuiKGGs= Received: by 10.87.62.28 with SMTP id p28mr3861560fgk.16.1271075854154; Mon, 12 Apr 2010 05:37:34 -0700 (PDT) Received: from [76.171.66.126] (server135.penguinhost.net [69.65.9.110]) by mx.google.com with ESMTPS id c28sm8275090fka.44.2010.04.12.05.37.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Apr 2010 05:37:33 -0700 (PDT) Message-ID: <4BC3140A.5080103@gmail.com> Date: Mon, 12 Apr 2010 14:37:30 +0200 From: Kristian Rosenvold User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: users@maven.apache.org Subject: Re: Wrong number of tests run when running JUnit tests in parallel: any help? References: <4BC245F2.2090009@googlemail.com> <4BC2C43D.30308@gmail.com> <4BC2FCCC.2090003@googlemail.com> <4BC30141.5080309@gmail.com> <4BC30C7F.6070808@googlemail.com> In-Reply-To: <4BC30C7F.6070808@googlemail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit As the blogpost mentions, junit+surefire by itself is unable to constrain the number of threads; you need CPC=true for any kind of thread limitation. Both threadCount and perCoreThreadCount are thread constraints, so you need CPC for both of them. And btw; if you like running betas you'll get a significant speed boost by switching to jdk 7 ;) Kristian Den 12.04.2010 14:05, skrev Paolo Castagna: > Kristian Rosenvold wrote: >> All your questions should be answered here; >> http://incodewetrustinc.blogspot.com/2010/01/run-your-junit-tests-concurrently-with.html > > > Thanks for the link, very useful. > > I have installed the configurable-parallel-computer as well. > Now I see configurableParallelComputerPresent=true. :-) > > But, I am still confused by the threadCount option... > Does it have any effect without the configurable-parallel-computer? > Does it have any effect if used in conjunction with perCoreThreadCount? > >> I generally do not advise the use of "both", "classes" is both easier >> to get running and usually faster. > > I am now using "classes", I trust you. > > For the project I am currently testing the "parallel" execution of > tests, I am probably in this scenario, as you wrote: "For a fairly > optimized unit-test set, expect little or no gain - maybe 15-20%." > > But, I'll use the approach for other projects. > > Paolo > >> >> >> Kristian >> >> >> >> >> >> Den 12.04.2010 12:58, skrev Paolo Castagna: >>> Thank you Kristian, >>> my mistake. I was trying to use parallel with an old project which >>> uses JUnit3 tests via JUnit4, so no @Test annotations. >>> >>> Now, I am trying again with another project which is using JUnit4 >>> with tests annotated with @Test. >>> >>> But I do not see any speed-up improvement (on a Quad Core). >>> >>> Also, I see: >>> >>> [INFO] Concurrency config is {threadCount=4, parallel=both, >>> configurableParallelComputerPresent=false} >>> >>> What the "configurableParallelComputerPresent=false" means? >>> >>> I am not even sure if threadCount=4 means 4 threads per core >>> or 4 threads in total. >>> >>> But, at least, this time the number of tests executed is correct. >>> >>> Thanks again, >>> Paolo >>> >>> Kristian Rosenvold wrote: >>>> Please note that the parallel provider actually requires correctly >>>> defined junit4/junit3 tests to run, annotate your methods with @Test. >>>> >>>> The "classic" Junit 4 provider would run a large number of tests >>>> that were incorrectly defined according to junit specifications. >>>> The concurrent provider uses the same >>>> selection mechanism as the junit 4 provider, but junit itself adds >>>> an additional compliance check before running the test. >>>> >>>> I also recommend you use the latest release of Junit; 4.8.2, or >>>> 4.8.1 if 4.8.2 hasn't reached the repos yet. >>>> >>>> Kristian >>>> Den 11.04.2010 23:58, skrev Paolo Castagna: >>>>> Hi, >>>>> I am trying to see if running JUnit tests in parallel makes any >>>>> difference and/or significant speed-up. >>>>> >>>>> I have this in my pom.xml: >>>>> >>>>> >>>>> junit >>>>> junit >>>>> 4.7 >>>>> test >>>>> >>>>> >>>>> [...] >>>>> >>>>> >>>>> org.apache.maven.plugins >>>>> maven-surefire-plugin >>>>> 2.5 >>>>> >>>>> >>>>> [...] >>>>> >>>>> methods >>>>> 4 >>>>> >>>>> >>>>> >>>>> When I run the tests without and I see: >>>>> >>>>> Tests run: 9491, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: >>>>> ... >>>>> >>>>> While when I run the tests with and as >>>>> showed >>>>> above: >>>>> >>>>> Tests run: 40, Failures: 0, Errors: 0, Skipped: 0 >>>>> >>>>> Is this a bug? >>>>> >>>>> Am I doing something wrong here? >>>>> >>>>> Thanks, >>>>> Paolo >>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >>>>> For additional commands, e-mail: users-help@maven.apache.org >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >>>> For additional commands, e-mail: users-help@maven.apache.org >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >>> For additional commands, e-mail: users-help@maven.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org