[Webtest] ant parallel testSpec not thread safe

Scot Hale webtest@lists.canoo.com
Tue, 25 Feb 2003 11:02:44 -0800


<html><div style='background-color:'><DIV></DIV>
<DIV></DIV>
<P>I was trying to run multiple tests in parallel earlier.&nbsp; For example : </P>
<P>&nbsp;&lt;target name="test"&gt;<BR>&nbsp;&nbsp;&lt;parallel&gt;<BR>&nbsp;&nbsp;&lt;antcall target="test1"/&gt;</P>
<P>.....<BR>&nbsp;&nbsp;&lt;antcall target="testN"/&gt;<BR>&nbsp; &lt;/parallel&gt;&nbsp;&nbsp;<BR>&nbsp;&lt;/target&gt;</P>
<P>&lt;target name="test1"&gt;<BR>&nbsp;&nbsp;&lt;testSpec name="test1"&gt;<BR>&nbsp;&nbsp;&nbsp;&amp;config;<BR>&nbsp;&nbsp;&nbsp;&lt;steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....<BR>&nbsp;&nbsp;&nbsp;&lt;/steps&gt;<BR>&nbsp;&nbsp;&lt;/testSpec&gt;<BR>&nbsp;&lt;/target&gt;<BR>.....</P>
<P>&lt;target name="testN"&gt;<BR>&nbsp;&nbsp;&lt;testSpec name="testN"&gt;<BR>&nbsp;&nbsp;&nbsp;&amp;config;<BR>&nbsp;&nbsp;&nbsp;&lt;steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....<BR>&nbsp;&nbsp;&nbsp;&lt;/steps&gt;<BR>&nbsp;&nbsp;&lt;/testSpec&gt;<BR>&nbsp;&lt;/target&gt;<BR><BR>And every now and then it will have problems opening the result file (e.g. result.xml).&nbsp; Would it be possible to make multiple testSpec's accessing the same result.xml in parallel "thread safe"?</P>
<P>The only work arounds I have right now are, to write the testSpec's in different build.xml's, just not run them in parallel (which takes longer), or just don't record the information in the result.xml </P>
<DIV>Scot Hale </DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>email: halesm@hotmail.com 
<DIV></DIV></div><br clear=all><hr>The new <a href="http://g.msn.com/8HMPENUS/2737">MSN 8:</a> smart spam protection and 2 months FREE* </html>