ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: svn commit: r1580520 - in /ant/core/trunk: ./ manual/Tasks/ src/main/org/apache/tools/ant/taskdefs/optional/junit/
Date Sun, 23 Mar 2014 17:50:13 GMT
Could you use the JUnit TemporaryFolder rule? That appears to be rather
threadsafe.


On 23 March 2014 11:28, Antoine Levy Lambert <antoine@gmx.de> wrote:

> Hi,
>
> Thanks to John Elion for this contribution.
>
> I have tried it on the Ant test cases. This makes the execution of the
> test cases shorter by 3 minutes with 2 threads [ not sure what is the total
> time because I also run the antunit tests ].
>
> Some of our test cases do not support parallelism because they are
> creating and dropping temporary directories and files which have the same
> names.
>
> this makes errors looking like this one :
>     [junit] Testcase:
> testNoAddNewLine(org.apache.tools.ant.filters.NoNewLineTest):     Caused an
> ERROR
>     [junit] Warning: Could not find file
> /Users/antoine/dev/asf/ant-core/src/etc/testcases/filters/result/nonl to
> copy.
>     [junit]
> /Users/antoine/dev/asf/ant-core/src/etc/testcases/filters/build.xml:111:
> Warning: Could not find file
> /Users/antoine/dev/asf/ant-core/src/etc/testcases/filters/result/nonl to
> copy.
>     [junit]     at
> org.apache.tools.ant.taskdefs.Copy.copySingleFile(Copy.java:639)
>
> Does someone have a suggestion about how to adapt the test cases to
> support parallelism.
>
> I was thinking of adding somewhere in the Ant codebase a utility class or
> method to get the PID of the currently running process
> and add the PID somewhere in the name of temporary folders created for
> tests.
>
> Any thoughts on that ?
>
> see
> http://stackoverflow.com/questions/35842/how-can-a-java-program-get-its-own-process-id
>
>
> Regards,
>
> Antoine
> On Mar 23, 2014, at 12:18 PM, antoine@apache.org wrote:
>
> > Author: antoine
> > Date: Sun Mar 23 16:18:29 2014
> > New Revision: 1580520
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Matt Sicker <boards@gmail.com>

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