You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Matt Benson <gu...@yahoo.com> on 2006/12/19 23:02:57 UTC

slow?

Has anyone ever noticed Ant running junit tests
exceedingly slowly, perhaps only in the case of
testsuites or nested testsuites?  I am looking at a
testsuite that has about 600 child tests, which all
run in < 2 seconds in Eclipse's JUnit runner, but take
15-20 minutes in Ant.  :|

-Matt

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: slow?

Posted by Matt Benson <gu...@yahoo.com>.
3.8.2.  I might try it with 3.8.1 tomorrow just for
kicks...  ;)

Thanks,
Matt

--- Kevin Cline <ke...@gmail.com> wrote:

> I have noticed the same thing.  Which version of
> Junit are you using?
> 
> On 12/19/06, Matt Benson <gu...@yahoo.com>
> wrote:
> >
> > Has anyone ever noticed Ant running junit tests
> > exceedingly slowly, perhaps only in the case of
> > testsuites or nested testsuites?  I am looking at
> a
> > testsuite that has about 600 child tests, which
> all
> > run in < 2 seconds in Eclipse's JUnit runner, but
> take
> > 15-20 minutes in Ant.  :|
> >
> > -Matt
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: slow?

Posted by Kevin Cline <ke...@gmail.com>.
I have noticed the same thing.  Which version of Junit are you using?

On 12/19/06, Matt Benson <gu...@yahoo.com> wrote:
>
> Has anyone ever noticed Ant running junit tests
> exceedingly slowly, perhaps only in the case of
> testsuites or nested testsuites?  I am looking at a
> testsuite that has about 600 child tests, which all
> run in < 2 seconds in Eclipse's JUnit runner, but take
> 15-20 minutes in Ant.  :|
>
> -Matt
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: slow?

Posted by Matt Benson <gu...@yahoo.com>.
--- Matt Benson <gu...@yahoo.com> wrote:

> Daniel:  Unfortunately, I never use forkmode="each"

Oops, that's "perTest".  Told you I never use it!  ;)

-Matt

> since Stefan added "once" as an option.  I see the
> slowness when forking once as well as when not
> forking.  :)  Thanks anyway for your reply!
> 
> -Matt
> 
> --- Daniel Lindner <da...@abas.de> wrote:
> 
> > Matt Benson wrote:
> > > Has anyone ever noticed Ant running junit tests
> > > exceedingly slowly, perhaps only in the case of
> > > testsuites or nested testsuites?  I am looking
> at
> > a
> > > testsuite that has about 600 child tests, which
> > all
> > > run in < 2 seconds in Eclipse's JUnit runner,
> but
> > take
> > > 15-20 minutes in Ant.  :|
> > 
> > Just to make sure you don't fall in the same trap
> as
> > me:
> > Eclipse uses a "one jvm instance for all tests"
> > approach. Thats as fast 
> > as one can get.
> > 
> > If you run your tests on a network drive with the
> > ant junit task, it 
> > will severely slow down the execution. I guess
> these
> > are caching effects 
> > on eclipse's side.
> > 
> > The next thing to look for is the "forkmode"
> > attribute of ant's junit 
> > task. It defaults to "one jvm per test class"
> > (perTest). That creates 
> > additional overhead for every testclass you use.
> > Using Testsuites 
> > indicates many test classes, so i suggest you
> check
> > that neither the 
> > junit task nor the batchtest tasks (if any) have
> the
> > default forkmode set.
> >
>
http://ant.apache.org/manual/OptionalTasks/junit.html
> > 
> > I hope that helped. This issue bugged me for a
> > while, i think the 
> > default value for forkmode is broken - if you
> watch
> > it from an 
> > "eclipsed" point of view.
> > 
> > Sincerely,
> > Daniel
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: slow?

Posted by Matt Benson <gu...@yahoo.com>.
Daniel:  Unfortunately, I never use forkmode="each"
since Stefan added "once" as an option.  I see the
slowness when forking once as well as when not
forking.  :)  Thanks anyway for your reply!

-Matt

--- Daniel Lindner <da...@abas.de> wrote:

> Matt Benson wrote:
> > Has anyone ever noticed Ant running junit tests
> > exceedingly slowly, perhaps only in the case of
> > testsuites or nested testsuites?  I am looking at
> a
> > testsuite that has about 600 child tests, which
> all
> > run in < 2 seconds in Eclipse's JUnit runner, but
> take
> > 15-20 minutes in Ant.  :|
> 
> Just to make sure you don't fall in the same trap as
> me:
> Eclipse uses a "one jvm instance for all tests"
> approach. Thats as fast 
> as one can get.
> 
> If you run your tests on a network drive with the
> ant junit task, it 
> will severely slow down the execution. I guess these
> are caching effects 
> on eclipse's side.
> 
> The next thing to look for is the "forkmode"
> attribute of ant's junit 
> task. It defaults to "one jvm per test class"
> (perTest). That creates 
> additional overhead for every testclass you use.
> Using Testsuites 
> indicates many test classes, so i suggest you check
> that neither the 
> junit task nor the batchtest tasks (if any) have the
> default forkmode set.
>
http://ant.apache.org/manual/OptionalTasks/junit.html
> 
> I hope that helped. This issue bugged me for a
> while, i think the 
> default value for forkmode is broken - if you watch
> it from an 
> "eclipsed" point of view.
> 
> Sincerely,
> Daniel
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: slow?

Posted by Daniel Lindner <da...@abas.de>.
Matt Benson wrote:
> Has anyone ever noticed Ant running junit tests
> exceedingly slowly, perhaps only in the case of
> testsuites or nested testsuites?  I am looking at a
> testsuite that has about 600 child tests, which all
> run in < 2 seconds in Eclipse's JUnit runner, but take
> 15-20 minutes in Ant.  :|

Just to make sure you don't fall in the same trap as me:
Eclipse uses a "one jvm instance for all tests" approach. Thats as fast 
as one can get.

If you run your tests on a network drive with the ant junit task, it 
will severely slow down the execution. I guess these are caching effects 
on eclipse's side.

The next thing to look for is the "forkmode" attribute of ant's junit 
task. It defaults to "one jvm per test class" (perTest). That creates 
additional overhead for every testclass you use. Using Testsuites 
indicates many test classes, so i suggest you check that neither the 
junit task nor the batchtest tasks (if any) have the default forkmode set.
http://ant.apache.org/manual/OptionalTasks/junit.html

I hope that helped. This issue bugged me for a while, i think the 
default value for forkmode is broken - if you watch it from an 
"eclipsed" point of view.

Sincerely,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org