|
|
@@ -20,6 +20,7 @@ package org.apache.tools.ant.taskdefs; |
|
|
|
import org.apache.tools.ant.Project; |
|
|
|
import org.apache.tools.ant.types.Path; |
|
|
|
import org.apache.tools.ant.types.Commandline; |
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os; |
|
|
|
import org.apache.tools.ant.util.JavaEnvUtils; |
|
|
|
|
|
|
|
import java.io.File; |
|
|
@@ -97,6 +98,12 @@ public class ExecuteJavaTest extends TestCase { |
|
|
|
|
|
|
|
// test that the watchdog ends the process |
|
|
|
public void testTimeOutForked() throws Exception { |
|
|
|
//process doesn't die properly under this combination, |
|
|
|
//thus test fails. No workaround? |
|
|
|
if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2) |
|
|
|
&& Os.isFamily("dos")) { |
|
|
|
return; |
|
|
|
} |
|
|
|
Commandline cmd = getCommandline(TIME_OUT*2); |
|
|
|
ej.setJavaCommand(cmd); |
|
|
|
long now = System.currentTimeMillis(); |
|
|
|