You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2009/01/02 00:36:51 UTC

Re: running "ant test" with multiple threads/processes?

: Has anyone explored ways to have "ant test" take advantage of concurrency?
: Since each JUnit test source (TestXXX.java) is independent, this should be
: possible.
: I'd love to have "ant test test-tag" run faster on an N-core machine.

I've see some attempts at a generalized solution to this in the past, but 
none of them ever seemed to successful.

manually spliting tests up into buckets and running <parallel> <junit> 
tasks for each bucket tends to be the approach many projects take.  in our 
case the first quick win might be to just add a new attribute to the 
contrib-crawl macro that says wether it can be parallelized or not, 
and then replace the <sequential> task with a <parallel threadCount="..."> 
task (use a threadCount="1" for things contrib-crawls that can't be 
parallelized)

test-contrib and javadocs-contrib should be parallelizable, but 
build-contrib won't be (since some contribs depend on other contribs)


that should help some ... but if you really want to parallelize test-core, 
we would need to hardcode some N <junit> calls each containing a filset 
(although with some creativity we could probably dynamicly divide the 
tests up into N filesets using things like the <sort>, <first> and 
<restrict> resource collections)

-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org