Skip to content

Commit d588da2

Browse files
marchofGodin
authored andcommitted
Fix race condition in Ant test (bazel-contrib#960)
1 parent 9049fd0 commit d588da2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,20 @@
2828
</java>
2929
</jacoco:coverage>
3030

31-
<waitfor maxwait="1" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond">
31+
<waitfor maxwait="60" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond" timeoutproperty="timeout">
3232
<socket server="localhost" port="6300"/>
3333
</waitfor>
34+
<fail message="Server startup timeout." if="timeout"/>
3435
</target>
3536

3637
<target name="tearDown">
3738
<touch file="${term.file}"/>
38-
<waitfor maxwait="5" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond">
39+
<waitfor maxwait="60" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond" timeoutproperty="timeout">
3940
<not>
4041
<socket server="localhost" port="6300"/>
4142
</not>
4243
</waitfor>
44+
<fail message="Server shutdown timeout." if="timeout"/>
4345
<delete dir="${temp.dir}" quiet="false" failonerror="true"/>
4446
</target>
4547

0 commit comments

Comments
 (0)