lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: running "ant test" with multiple threads/processes?
Date Thu, 01 Jan 2009 23:36:51 GMT

: Has anyone explored ways to have "ant test" take advantage of concurrency?
: Since each JUnit test source ( 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 

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)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message