lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Efficiently running a single test class' tests?
Date Fri, 04 Sep 2009 20:16:35 GMT
That's some weird stuff - I've never seen a test take anywhere near  
that long (run single or not) - on my machine there are a couple that  
take a minute at most, but the majority are sub second to a couple  
seconds.

- Mark

http://www.lucidimagination.com (mobile)

On Sep 4, 2009, at 1:35 PM, Chris Harris <ryguasu@gmail.com> wrote:

> I gather that you can run the tests from a single test class by
> specifying that class's name like so:
>
>    ant test -Dtestcase=ShingleFilterTest
>
> This saves time over doing "ant test" without the testcase argument,
> but it's still not at all fast on my machine. To be more specific, I
> tried the following:
>
> * download a fresh Lucene r811157
> * run "ant test -Dtestcase=ShingleFilterTest" a first time, to make
> sure everything required to run this test gets built
> * run "ant test -Dtestcase=ShingleFilterTest" a second time, to see
> how long running the single test takes once everything is built
>
> This second invocation to ant took 7 minutes, 8 seconds for ant to
> finish. Most of the time was obviously not spent running the
> ShingleFilterTest itself. According to the
> TEST-org.apache.lucene.analysis.shingle.ShingleFilterTest.xml output
> file, running that particular class took only
>
>    time="0.578"
>
> which I assume is in seconds. So the great bulk of the "ant test"
> seems to be spent in various ant housecleaning tasks, trying to verify
> that everything is indeed built, and/or looking for test classes that
> might match the name "ShingleFilterTest".
>
> I tried running
>
>    ant test-contrib -Dtestcase=ShingleFilterTest
>
> to see if limiting to contrib would be any faster. That came back in 5
> minutes, 27 seconds. Which is better, but still in the same ballpark.
>
> Is this the sort of time other people see when running a single test
> through ant? What alternatives are there if you want to be able to run
> a given test really fast -- say, after a 10 second delay, rather than
> a 5 minute delay? Does this become trivial once you set up Lucene
> properly in an IDE? Any quick command-line techniques?
>
> Thanks,
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>

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


Mime
View raw message