Browse Source

Somehat more intelligent way to let windows catch up in java test

PR: 34502


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278168 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 20 years ago
parent
commit
c0bb2736d0
1 changed files with 11 additions and 9 deletions
  1. +11
    -9
      src/etc/testcases/taskdefs/java.xml

+ 11
- 9
src/etc/testcases/taskdefs/java.xml View File

@@ -169,10 +169,6 @@

<!--redirection testcases don't want to run under junit unless forked-->
<target name="redirect1">
<condition property="sleeptime" value="2000">
<os family="windows"/>
</condition>
<property name="sleeptime" value="1"/>
<property name="outfile" location="${tmp}/redirect.out" />

<java classname="${pipeapp}"
@@ -185,10 +181,13 @@
</java>

<!-- let dumb Windows catch up -->
<waitfor>
<waitfor maxwait="30000">
<available file="${outfile}" />
</waitfor>
<sleep milliseconds="${sleeptime}"/>
<waitfor maxwait="30000">
<length file="${outfile}" length="1" when="greater" />
</waitfor>

<loadfile property="redirect.out.contents" srcfile="${outfile}" />

<condition property="r1file">
@@ -221,11 +220,14 @@ redirect.err=&quot;${redirect.err}&quot; should be empty</fail>
</java>

<!-- let dumb Windows catch up -->
<waitfor>
<waitfor maxwait="30000">
<available file="${outfile}" />
</waitfor>
<sleep milliseconds="${sleeptime}"/>

<waitfor maxwait="30000">
<length file="${outfile}" length="1" when="greater" />
</waitfor>
<loadfile property="redirect.out.contents2" srcfile="${outfile}" />

<condition property="r2file">


Loading…
Cancel
Save