diff options
| author | Jacobus Martinus Kruithof <jkf@apache.org> | 2005-04-22 19:54:03 +0000 |
|---|---|---|
| committer | Jacobus Martinus Kruithof <jkf@apache.org> | 2005-04-22 19:54:03 +0000 |
| commit | c0bb2736d0aed60c7458760eab6d28c5bca04b6f (patch) | |
| tree | 3f192dda5ac43d5a340f7102a50072d0c4f2ea25 /src/etc/testcases/taskdefs/java.xml | |
| parent | c1153f2f17990edb8378a5b351c20cf7112ed207 (diff) | |
| download | ant-c0bb2736d0aed60c7458760eab6d28c5bca04b6f.tar.gz | |
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
Diffstat (limited to 'src/etc/testcases/taskdefs/java.xml')
| -rw-r--r-- | src/etc/testcases/taskdefs/java.xml | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/etc/testcases/taskdefs/java.xml b/src/etc/testcases/taskdefs/java.xml index 0df28865e..6f2f428e6 100644 --- a/src/etc/testcases/taskdefs/java.xml +++ b/src/etc/testcases/taskdefs/java.xml @@ -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="${redirect.err}" 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"> |
