ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laura Dean <lgd...@cyrusinnovation.com>
Subject Re: problem trying to set individual tests timeout
Date Fri, 14 Sep 2012 13:17:43 GMT
As I read it, that's the expected behavior:

   When running multiple tests inside the same Java VM (see forkMode),
   timeout applies to the time that all tests use together, not to an
   individual test.
   http://ant.apache.org/manual/Tasks/junit.html

You have forkMode set to once, which means you're running your tests in the
same JVM.

If you fork per test, you'll presumably get the desired behavior, so
perhaps that could work for you.  Or per batch, if only certain tests that
need this behavior.  (Or two separate junit tasks, or... it really depends
on what you're trying to do.)

Laura

On Wed, Sep 12, 2012 at 4:43 PM, vale <valebengolea@gmail.com> wrote:

> Hi, I need to set individual test timeout. Im using the timeout option but
> when the time is over for an individual test it does not continue the
> execution of the rest of the suite. Any Idea what Im doing wrong? here is
> my
> code:
>
> <target name="runTest">
>                 <mkdir dir="${junit.output.dir}"/>
>                 <junit fork="true" forkmode="once"
> printsummary="withOutAndErr"
> haltonfailure="false"
>                            haltonerror="off" showoutput="true"
> timeout="60000">
>                     <formatter type="xml"/>
>                     <test name="EjemploTest" todir="${junit.output.dir}"/>
>                     <classpath refid="ejemplo.classpath"/>
>                 </junit>
>             </target>
>
> thanks in advance!
>
>
>
> --
> View this message in context:
> http://ant.1045680.n5.nabble.com/problem-trying-to-set-individual-tests-timeout-tp5713544.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message