From: markt Date: Tue, 1 Mar 2011 13:24:31 +0000 (+0000) Subject: Fix bug in unit test due to some Lifecycle refactoring X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=171025ec8a5b2000565fb5abe853346a30f9feee;p=tomcat7.0 Fix bug in unit test due to some Lifecycle refactoring git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1075811 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/core/TestStandardContextResources.java b/test/org/apache/catalina/core/TestStandardContextResources.java index 79d2bd466..d0b0fa3cc 100644 --- a/test/org/apache/catalina/core/TestStandardContextResources.java +++ b/test/org/apache/catalina/core/TestStandardContextResources.java @@ -29,6 +29,8 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.catalina.Lifecycle; +import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.deploy.WebXml; import org.apache.catalina.startup.ContextConfig; @@ -149,6 +151,9 @@ public class TestStandardContextResources extends TomcatBaseTest { // prevent it from looking ( if it finds one - it'll have dup error ) config1.setDefaultWebXml("org/apache/catalin/startup/NO_DEFAULT_XML"); listener1[1] = config1; + // Need to init since context won't call init + config1.lifecycleEvent( + new LifecycleEvent(ctx, Lifecycle.AFTER_INIT_EVENT, null)); Tomcat.addServlet(ctx, "getresource", new GetResourceServlet()); ctx.addServletMapping("/getresource", "getresource");