Troubleshooting when Replaying Tests with Ant

When running Silk4J tests with Apache Ant, using the JUnit task with fork="yes" causes the tests to hang. This is a known issue of Apache Ant (https://issues.apache.org/bugzilla/show_bug.cgi?id=27614). You can use one of the following two workarounds:
  • Do not use fork="yes".
  • To use fork="yes", ensure that the Open Agent is launched before the tests are executed. This can be done either manually or with the following Ant target:
    <property environment="env" />
    <target name="launchOpenAgent">
    <echo message="OpenAgent launch as spawned process" /> 
    <exec spawn="true" executable="${env.OPEN_AGENT_HOME}/agent/openAgent.exe" />
    <!-- give the agent time to start --> 
    <sleep seconds="30" />
    </target>