Author: mwringe
Date: 2009-10-13 23:49:15 -0400 (Tue, 13 Oct 2009)
New Revision: 341
Added:
components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml
components/wci/trunk/test/src/test/resources/spi/exo/
components/wci/trunk/test/src/test/resources/spi/exo/app-war/
components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/
components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml
Modified:
components/wci/trunk/test/pom.xml
components/wci/trunk/test/src/test/build.xml
Log:
Update wci tests to test for exo backwards compatibility.
Update wci tests to tests that generic and exo portlets will deploy in a container
specific setup.
Modified: components/wci/trunk/test/pom.xml
===================================================================
--- components/wci/trunk/test/pom.xml 2009-10-13 16:39:16 UTC (rev 340)
+++ components/wci/trunk/test/pom.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -18,6 +18,10 @@
<groupId>org.gatein.wci</groupId>
<artifactId>wci-tomcat</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-exo</artifactId>
+ </dependency>
<dependency>
<artifactId>junit</artifactId>
@@ -243,6 +247,7 @@
<property name="dependency.gatein-common-mc.jar"
value="${maven.dependency.org.gatein.common.common-mc.jar.path}" />
<property name="dependency.gatein-wci-core.jar"
value="${maven.dependency.org.gatein.wci.wci-wci.jar.path}" />
<property name="dependency.gatein-wci-tomcat.jar"
value="${maven.dependency.org.gatein.wci.wci-tomcat.jar.path}" />
+ <property name="dependency.gatein-wci-exo.jar"
value="${maven.dependency.org.gatein.wci.wci-exo.jar.path}" />
<!-- JBoss Unit -->
<property name="dependency.jboss-unit.jar"
value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}" />
Modified: components/wci/trunk/test/src/test/build.xml
===================================================================
--- components/wci/trunk/test/src/test/build.xml 2009-10-13 16:39:16 UTC (rev 340)
+++ components/wci/trunk/test/src/test/build.xml 2009-10-14 03:49:15 UTC (rev 341)
@@ -238,6 +238,7 @@
<path refid="gatein-common-shared"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
<path path="${dependency.gatein-wci-core.jar}"/>
+ <path path="${dependency.gatein-wci-exo.jar}"/>
</path>
<path id="jboss-5.1">
@@ -250,6 +251,7 @@
<path refid="gatein-common-shared"/>
<path path="${dependency.gatein-wci-core.jar}"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
+ <path path="${dependency.gatein-wci-exo.jar}"/>
</path>
<path id="tomcat-6.0">
@@ -271,6 +273,7 @@
<path location="${dependency.junit.jar}"/>
<path path="${dependency.gatein-wci-core.jar}"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
+ <path path="${dependency.gatein-wci-exo.jar}"/>
<path location="${dependency.jboss-serialization.jar}"/>
</path>
@@ -293,6 +296,18 @@
<fileset dir="${target}/test-classes//portal-test-spi-jar"/>
</jar>
+ <!-- SPI Test case for Container Specific Implementation -->
+ <jar jarfile="${test.temp.lib}/portal-test-spi-cs-lib.jar">
+ <fileset dir="${target}/test-classes/">
+ <include name="org/gatein/wci/spi/**"/>
+ <include name="org/gatein/wci/ServletTestCase.class"/>
+ <include name="org/gatein/wci/TestServlet.class"/>
+ <include name="org/gatein/wci/WebAppRegistry.class"/>
+ </fileset>
+ <fileset dir="${target}/test-classes//portal-test-spi-cs-jar"/>
+ </jar>
+
+
<!-- **************************** -->
<!-- Tomcat 6.0 container servlet -->
<!-- **************************** -->
@@ -303,11 +318,17 @@
<mkdir dir="${test.temp.lib}/tomcat-6.0-container-servlet"/>
<war
jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-spi-server.war">
<fileset
dir="${test.support}/tomcat-6.0-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-cs-lib.jar"/>
</war>
<jar
jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
</jar>
+ <jar
jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-generic-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
+ <jar
jarfile="${test.temp.lib}/tomcat-6.0-container-servlet/test-exo-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
<!-- **************************** -->
<!-- Tomcat 6.0 lifecyle listener -->
@@ -343,6 +364,25 @@
<fileset dir="${target}/test-classes/spi/generic/app-war"/>
</jar>
+ <!-- ****************** -->
+ <!-- Tomcat 6.0 eXo -->
+ <!-- ****************** -->
+
+ <!-- -->
+ <mkdir
dir="${test.support}/tomcat-6.0-exo/server-war/WEB-INF/lib"/>
+ <copy todir="${test.support}/tomcat-6.0-exo/server-war/WEB-INF/lib"
flatten="true">
+ <path refid="tomcat-6.0"/>
+ </copy>
+ <mkdir dir="${test.temp.lib}/tomcat-6.0-exo"/>
+ <war
jarfile="${test.temp.lib}/tomcat-6.0-exo/test-spi-server.war">
+ <fileset dir="${test.support}/tomcat-6.0-exo/server-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/tomcat-6.0-exo/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
+
<!-- **************************** -->
<!-- Jetty 6.1 handler -->
<!-- **************************** -->
@@ -388,12 +428,19 @@
<mkdir dir="${test.temp.lib}/jboss-4.2-container-servlet"/>
<war
jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-spi-server.war">
<fileset
dir="${test.support}/jboss-4.2-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-cs-lib.jar"/>
</war>
<jar
jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
</jar>
+ <jar
jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-generic-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
+ <jar
jarfile="${test.temp.lib}/jboss-4.2-container-servlet/test-exo-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
<!-- ***************** -->
<!-- JBoss 4.2 generic -->
<!-- ***************** -->
@@ -423,6 +470,24 @@
<fileset
dir="${target}/test-classes/portal-test-endpoint-jar"/>
</jar>
+ <!-- ***************** -->
+ <!-- JBoss 4.2 eXo -->
+ <!-- ***************** -->
+
+ <!-- -->
+ <copy todir="${test.support}/jboss-4.2-exo/server-war/WEB-INF/lib"
flatten="true">
+ <path refid="jboss-4.2"/>
+ </copy>
+ <mkdir dir="${test.temp.lib}/jboss-4.2-exo"/>
+ <war jarfile="${test.temp.lib}/jboss-4.2-exo/test-spi-server.war">
+ <fileset dir="${test.support}/jboss-4.2-exo/server-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/jboss-4.2-exo/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
+
<!-- *************************** -->
<!-- JBoss 5.1 container servlet -->
<!-- *************************** -->
@@ -436,12 +501,19 @@
<fileset
dir="${test.support}/jboss-5.1-container-servlet/server-war">
<exclude name="**/jboss-kernel*.jar"/>
</fileset>
- <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-cs-lib.jar"/>
</war>
<jar
jarfile="${test.temp.lib}/jboss-5.1-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
</jar>
+ <jar
jarfile="${test.temp.lib}/jboss-5.1-container-servlet/test-generic-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
+ <jar
jarfile="${test.temp.lib}/jboss-5.1-container-servlet/test-exo-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war"/>
+ </jar>
+
<!-- ***************** -->
<!-- JBoss 5.1 generic -->
<!-- ***************** -->
@@ -462,6 +534,27 @@
</fileset>
</jar>
+ <!-- ***************** -->
+ <!-- JBoss 5.1 eXo -->
+ <!-- ***************** -->
+
+ <copy todir="${test.support}/jboss-5.1-exo/server-war/WEB-INF/lib"
flatten="true">
+ <path refid="jboss-5.1"/>
+ </copy>
+ <mkdir dir="${test.temp.lib}/jboss-5.1-exo"/>
+ <war jarfile="${test.temp.lib}/jboss-5.1-exo/test-spi-server.war">
+ <fileset dir="${test.support}/jboss-5.1-exo/server-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar jarfile="${test.temp.lib}/jboss-5.1-exo/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/exo/app-war">
+ <exclude name="**/jboss-kernel*.jar"/>
+ </fileset>
+ </jar>
+
+
<!--endpoint test case-->
<jar jarfile="${test.temp.lib}/portal-test-endpoint-lib.jar">
@@ -689,6 +782,11 @@
<param name="test.war"
value="${test.temp.lib}/jboss-4.2-generic/test-spi-server.war"/>
<param name="test.archive.path"
value="jboss-4.2-generic"/>
</antcall>
+ <antcall target="tests.jboss-4.2.execute">
+ <param name="test.id"
value="${test.jboss-4.2.name}-spi-exo"/>
+ <param name="test.war"
value="${test.temp.lib}/jboss-4.2-exo/test-spi-server.war"/>
+ <param name="test.archive.path"
value="jboss-4.2-exo"/>
+ </antcall>
</target>
<target name="tests.jboss-4.2.endpoint">
@@ -828,6 +926,11 @@
<param name="test.war"
value="${test.temp.lib}/jboss-5.1-generic/test-spi-server.war"/>
<param name="test.archive.path"
value="jboss-5.1-generic"/>
</antcall>
+ <antcall target="tests.jboss-5.1.execute">
+ <param name="test.id"
value="${test.jboss-5.1.name}-spi-exo"/>
+ <param name="test.war"
value="${test.temp.lib}/jboss-5.1-exo/test-spi-server.war"/>
+ <param name="test.archive.path"
value="jboss-5.1-exo"/>
+ </antcall>
</target>
<target name="tests.jboss-5.1.endpoint">
@@ -935,6 +1038,11 @@
<param name="test.war"
value="${test.temp.lib}/tomcat-6.0-generic/test-spi-server.war"/>
<param name="test.archive.path"
value="tomcat-6.0-generic"/>
</antcall>
+ <antcall target="tests.tomcat-6.0.execute">
+ <param name="test.id"
value="${test.tomcat-6.0.name}-spi-exo"/>
+ <param name="test.war"
value="${test.temp.lib}/tomcat-6.0-exo/test-spi-server.war"/>
+ <param name="test.archive.path"
value="tomcat-6.0-exo"/>
+ </antcall>
</target>
<target name="tests.tomcat-6.0.endpoint">
Added:
components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java
===================================================================
---
components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java
(rev 0)
+++
components/wci/trunk/test/src/test/java/org/gatein/wci/spi/SPICompatibilityTestCase.java 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,135 @@
+package org.gatein.wci.spi;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+
+import org.gatein.wci.ServletContainer;
+import org.gatein.wci.ServletTestCase;
+import org.gatein.wci.TestServlet;
+import org.gatein.wci.WebApp;
+import org.gatein.wci.WebAppRegistry;
+import org.gatein.wci.WebRequest;
+import org.gatein.wci.WebResponse;
+import org.gatein.wci.impl.DefaultServletContainerFactory;
+import org.jboss.unit.Failure;
+import org.jboss.unit.driver.DriverCommand;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.driver.response.FailureResponse;
+import org.jboss.unit.remote.driver.handler.deployer.response.DeployResponse;
+
+public class SPICompatibilityTestCase extends ServletTestCase
+{
+
+ /** . */
+ private WebAppRegistry registry;
+
+ /** . */
+ private Set<String> keys;
+
+ /** . */
+ private ServletContainer container;
+
+ public DriverResponse service(TestServlet testServlet, WebRequest req, WebResponse
resp) throws ServletException, IOException
+ {
+ // we shouldn't be calling service for these tests
+ return new FailureResponse(Failure.createAssertionFailure("Service call
should not be called"));
+ }
+
+
+ public DriverResponse invoke(TestServlet testServlet, DriverCommand driverCommand)
+ {
+ if (getRequestCount() == -1)
+ {
+ container =
DefaultServletContainerFactory.getInstance().getServletContainer();
+ if (container == null)
+ {
+ return new FailureResponse(Failure.createAssertionFailure("No servlet
container present"));
+ }
+
+ // Register and save the deployed web apps
+ registry = new WebAppRegistry();
+ container.addWebAppListener(registry);
+ keys = new HashSet<String>(registry.getKeys());
+
+ // Deploy the application web app
+ return new DeployResponse("test-spi-app.war");
+ }
+ else if (getRequestCount() == 0)
+ {
+ FailureResponse failureResponse = checkDeployments("/test-spi-app",
1);
+ if (failureResponse != null)
+ {
+ return failureResponse;
+ }
+ else
+ {
+ // deploy test-generic-app.war
+ return new DeployResponse("test-generic-app.war");
+ }
+ }
+ else if (getRequestCount() == 1)
+ {
+ FailureResponse failureResponse = checkDeployments("/test-generic-app",
2);
+ if (failureResponse != null)
+ {
+ return failureResponse;
+ }
+ else
+ {
+ return new DeployResponse("test-exo-app.war");
+ }
+ }
+ else if (getRequestCount() == 2)
+ {
+ FailureResponse failureResponse = checkDeployments("/test-exo-app",
3);
+ if (failureResponse != null)
+ {
+ return failureResponse;
+ }
+ else
+ {
+ return new EndTestResponse();
+ }
+ }
+ else
+ {
+ return new FailureResponse(Failure.createAssertionFailure(""));
+ }
+ }
+
+ protected FailureResponse checkDeployments(String appContext, int count)
+ {
+ // Compute the difference with the previous deployed web apps
+ Set diff = new HashSet<String>(registry.getKeys());
+ diff.removeAll(keys);
+
+ // It should be 1
+ if (diff.size() != count)
+ {
+ return new FailureResponse(Failure.createAssertionFailure("The size of
the new web application deployed should be " + count + ", it is " +
diff.size() + " instead." +
+ "The previous set was " + keys + " and the new set is "
+ registry.getKeys()));
+ }
+ if (!diff.contains(appContext))
+ {
+ return new FailureResponse(Failure.createErrorFailure("Could not find the
requested webapp [" + appContext + "] in the list of depoyed webapps."));
+ }
+
+ //
+ WebApp webApp = registry.getWebApp(appContext);
+ if (webApp == null)
+ {
+ return new FailureResponse(Failure.createAssertionFailure("The web app
" + appContext + " was not found"));
+ }
+ if (!appContext.equals(webApp.getContextPath()))
+ {
+ return new FailureResponse(Failure.createAssertionFailure("The web app
context is not equals to the expected value [" + appContext + "] but has the
value " + webApp.getContextPath()));
+ }
+
+ return null;
+ }
+
+}
Added:
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/portal-test-spi-cs-jar/org/jboss/portal/test/web/server-beans.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="RemoteTestSuite"
class="org.jboss.unit.remote.driver.CompositeRemoteTestDriver">
+ <constructor>
+ <parameter
class="org.jboss.unit.driver.impl.composite.AbstractCompositeTestDriver"><inject
bean="TestSuite"/></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="TestDriverServer"
class="org.jboss.unit.remote.driver.RemoteTestDriverServer">
+ <property name="delegate"><inject
bean="RemoteTestSuite"/></property>
+ </bean>
+
+ <bean name="TestDriverServerExporter"
class="org.jboss.portal.test.framework.impl.generic.server.GenericServiceExporter">
+ <constructor>
+ <parameter>socket://localhost:5400</parameter>
+ <parameter><inject
bean="TestDriverServer"/></parameter>
+
<parameter>org.jboss.unit.remote.driver.RemoteTestDriver</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="ServletContainerFactory"
GetTestCaseclass="org.gatein.wci.impl.DefaultServletContainerFactory">
+ <constructor
factoryClass="org.gatein.wci.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>
+ </bean>
+
+ <bean name="ServletContainer"
class="org.gatein.wci.ServletContainer">
+ <constructor factoryMethod="getServletContainer">
+ <factory bean="ServletContainerFactory"/>
+ </constructor>
+ </bean>
+
+ <bean name="TestSuite"
class="org.jboss.unit.driver.impl.composite.CompositeTestDriver"/>
+
+ <bean name="SPITestCase"
class="org.gatein.wci.spi.SPITestCase">
+ <install bean="TestSuite" method="mount">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="TestSuite" method="unmount">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+ <bean name="SPICompatiblityTestCase"
class="org.gatein.wci.spi.SPICompatibilityTestCase">
+ <install bean="TestSuite" method="mount">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="TestSuite" method="unmount">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+</deployment>
Added: components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/spi/exo/app-war/WEB-INF/web.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+ <web-app>
+
+ <listener>
+
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+
<servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added:
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/jboss-web.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added:
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/jboss-4.2-exo/server-war/WEB-INF/web.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <listener>
+
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <listener>
+
<listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.gatein.wci.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+
<servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
Added:
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/META-INF/context.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,2 @@
+<Context crossContext="true">
+</Context>
\ No newline at end of file
Added:
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/jboss-web.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>test:loader=portlet</loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added:
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/jboss-5.1-exo/server-war/WEB-INF/web.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <listener>
+
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <listener>
+
<listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+
<servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.gatein.wci.TestServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
Added:
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/META-INF/context.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,2 @@
+<Context crossContext="true">
+</Context>
\ No newline at end of file
Added:
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties
===================================================================
---
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/log4j.properties 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,13 @@
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Log4j Configuration ##
+## ##
+### ====================================================================== ###
+
+log4j.rootCategory=ALL, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Added:
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties
===================================================================
---
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/classes/logging.properties 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,13 @@
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = test-spi.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Added:
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml
===================================================================
---
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml
(rev 0)
+++
components/wci/trunk/test/src/test/resources/support/tomcat-6.0-exo/server-war/WEB-INF/web.xml 2009-10-14
03:49:15 UTC (rev 341)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <listener>
+
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <listener>
+
<listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.gatein.wci.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+
<servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>