You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by dr...@apache.org on 2011/03/14 22:35:39 UTC
svn commit: r1081573 - in /tapestry/tapestry5/trunk/tapestry-test: pom.xml
src/main/java/org/apache/tapestry5/test/Tomcat6Runner.java
Author: drobiazko
Date: Mon Mar 14 21:35:38 2011
New Revision: 1081573
URL: http://svn.apache.org/viewvc?rev=1081573&view=rev
Log:
TAP5-1473: Running integration tests with Tomcat6Runner it should be possible to configure the application under test by providing a local context.xml file
Modified:
tapestry/tapestry5/trunk/tapestry-test/pom.xml
tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/Tomcat6Runner.java
Modified: tapestry/tapestry5/trunk/tapestry-test/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/pom.xml?rev=1081573&r1=1081572&r2=1081573&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-test/pom.xml Mon Mar 14 21:35:38 2011
@@ -69,7 +69,12 @@
<version>6.0.30</version>
<scope>compile</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>dbcp</artifactId>
+ <version>6.0.30</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/Tomcat6Runner.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/Tomcat6Runner.java?rev=1081573&r1=1081572&r2=1081573&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/Tomcat6Runner.java (original)
+++ tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/Tomcat6Runner.java Mon Mar 14 21:35:38 2011
@@ -69,6 +69,11 @@ public class Tomcat6Runner implements Se
wrapper.setServletClass(DefaultServlet.class.getName());
context.addChild(wrapper);
context.addServletMapping("/", name);
+
+ File contextConfigFile = new File(webappFolder, "META-INF/context.xml");
+
+ if(contextConfigFile.exists())
+ context.setConfigFile(contextConfigFile.getAbsolutePath());
context.setLoader(new WebappLoader(this.getClass().getClassLoader()));