|
|
@@ -628,4 +628,41 @@ |
|
|
|
</exec> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="testDoesntWaitForChildren" |
|
|
|
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=5003"> |
|
|
|
<mkdir dir="${input}/org/example"/> |
|
|
|
<pathconvert dirsep="/" property="out"> |
|
|
|
<path location="${output}"/> |
|
|
|
</pathconvert> |
|
|
|
<echo file="${input}/org/example/CallHello.java"><![CDATA[ |
|
|
|
package org.example; |
|
|
|
public class CallHello { |
|
|
|
public static void main(String[] args) |
|
|
|
throws Exception { |
|
|
|
Runtime.getRuntime().exec("java -cp ${out} org.example.Hello"); |
|
|
|
Thread.sleep(1 * 1000); |
|
|
|
System.out.println("finished"); |
|
|
|
} |
|
|
|
}]]></echo> |
|
|
|
<echo file="${input}/org/example/Hello.java"><![CDATA[ |
|
|
|
package org.example; |
|
|
|
public class Hello { |
|
|
|
public static void main(String[] args) |
|
|
|
throws Exception { |
|
|
|
for (int i = 0; i < 20; ++i) { |
|
|
|
System.out.println("Hello " + i); |
|
|
|
System.out.flush(); |
|
|
|
Thread.sleep(1 * 1000); |
|
|
|
} |
|
|
|
} |
|
|
|
}]]></echo> |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
<javac srcdir="${input}" destdir="${output}"/> |
|
|
|
<exec executable="java"> |
|
|
|
<arg line="-cp ${output} org.example.CallHello"/> |
|
|
|
</exec> |
|
|
|
<au:assertLogContains text="finished"/> |
|
|
|
<au:assertLogDoesntContain text="Hello 20"/> |
|
|
|
</target> |
|
|
|
|
|
|
|
</project> |