*/
private void executeInContainer(Container theContainer,
DeployableFile theFile)
{
log("Starting up container", Project.MSG_VERBOSE);
ContainerRunner runner = new ContainerRunner(theContainer);
runner.setLog(new AntLog(this));
try
{
URL url =
new URL("http", "localhost", theContainer.getPort(), "/"
+ theFile.getTestContext()
+ theFile.getServletRedirectorMapping()
+ "?Cactus_Service=RUN_TEST");
runner.setUrl(url);
if (this.containerSet.getTimeout() > 0)
{
runner.setTimeout(this.containerSet.getTimeout());
}
runner.startUpContainer();
log("Container responding to HTTP requests as "
+ runner.getServerName(), Project.MSG_VERBOSE);
try
{
Enumeration tests = getIndividualTests();
while (tests.hasMoreElements())
{
JUnitTest test = (JUnitTest) tests.nextElement();
if (test.shouldRun(getProject())
&& !theContainer.isExcluded(test.getName()))
{
if (theContainer.getToDir() != null)
{
test.setTodir(theContainer.getToDir());
}
execute(test);
}
}
}
finally
{
log("Shutting down container", Project.MSG_VERBOSE);
runner.shutDownContainer();
log("Container shut down", Project.MSG_VERBOSE);
}
}
catch (MalformedURLException mue)
{