UNCLASSIFIED 

Hi, 

I have the following in my unit test. 

    @BeforeClass
    public static void setUpClass() throws ServletException,
LifecycleException, MalformedURLException {
        tomcat = new Tomcat();
        tomcat.setBaseDir(".");
        tomcat.setPort(8084);
        Context ctx = tomcat.addWebapp("/",
System.getProperty("user.dir") + "/build/web");
        tomcat.setHostname("localhost"); 

        File contextFile = new File(System.getProperty("user.dir") +
"/build/web/META-INF/context.xml");
        ctx.setConfigFile(contextFile.toURI().toURL()); 

        tomcat.enableNaming();
        tomcat.start();
        tomcat.getServer().await();       
    } 

Without the line `tomcat.getServer().await();`, Tomcat simply stops;
with the line `tomcat.getServer().await();`, it looks as though the
thread blocks and my unit tests don't execute.. Any idea?

James 

IMPORTANT: This email remains the property of the Department of Defence
and is subject to the jurisdiction of section 70 of the Crimes Act 1914.
If you have received this email in error, you are requested to contact
the sender and delete the email. 


Reply via email to