ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: problem trying to set individual tests timeout
Date Fri, 14 Sep 2012 14:50:16 GMT

Be careful NOT to set forkMode to anything but 'never'
a OS that can take >2048 byte character assignment for the Task  would cut off the command
buffer at 2048 e.g.

"java -classpath fu.jar;bar.jar....
2050 bytes later...
fubar.jar MyTest.class"

expect this command to FAIL on any OS that cut off command buffers >2048 characters

same hold true for maven-surefire-plugin <forkMode>
Martin Gainty 
______________________________________________ 
But on those occasions when I do strongly disagree 
with the Democrats and I don't say anything, I think I forfeit my right 
to have people pay attention to meB Frank....Newton MA



> Date: Fri, 14 Sep 2012 09:17:43 -0400
> Subject: Re: problem trying to set individual tests timeout
> From: lgdean@cyrusinnovation.com
> To: user@ant.apache.org
> 
> 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