Author: struberg
Date: Mon Sep 24 23:04:30 2012
New Revision: 1389647

URL: http://svn.apache.org/viewvc?rev=1389647&view=rev
Log:
OWB-705 add integration test for our broken code

Added:
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java
      - copied, changed from r1389623, 
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
Removed:
    
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
Modified:
    openwebbeans/trunk/webbeans-tomcat7/pom.xml
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml

Modified: openwebbeans/trunk/webbeans-tomcat7/pom.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/pom.xml?rev=1389647&r1=1389646&r2=1389647&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/pom.xml (original)
+++ openwebbeans/trunk/webbeans-tomcat7/pom.xml Mon Sep 24 23:04:30 2012
@@ -29,6 +29,13 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.2.1</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.tomcat</groupId>
             <artifactId>tomcat-catalina</artifactId>
             <version>7.0.0</version>

Modified: openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml?rev=1389647&r1=1389646&r2=1389647&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml 
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml Mon Sep 
24 23:04:30 2012
@@ -40,6 +40,21 @@
 
     <dependencies>
         <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.2</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.2.1</version>
+            <scope>test</scope>
+        </dependency>
+
+
+        <dependency>
             <groupId>org.apache.tomcat</groupId>
             <artifactId>tomcat-catalina</artifactId>
             <version>7.0.0</version>
@@ -85,6 +100,7 @@
     </dependencies>
 
     <build>
+        <finalName>owbtomcat7it</finalName>
         <pluginManagement>
             <plugins>
                 <plugin>

Modified: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml?rev=1389647&r1=1389646&r2=1389647&view=diff
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
 (original)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
 Mon Sep 24 23:04:30 2012
@@ -19,7 +19,8 @@ under the License.
 -->
 <web-app id="owb-it" version="3.0"
          xmlns="http://java.sun.com/xml/ns/javaee";
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";>
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";>
     <servlet>
         <servlet-name>TestServlet</servlet-name>
         
<servlet-class>org.apache.webbeans.web.tomcat7.test.TestServlet</servlet-class>

Copied: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java
 (from r1389623, 
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java)
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java?p2=openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java&p1=openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java&r1=1389623&r2=1389647&rev=1389647&view=diff
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
 (original)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java
 Mon Sep 24 23:04:30 2012
@@ -16,12 +16,30 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.webbeans.web.tomcat.test;
+package org.apache.webbeans.web.tomcat7.test;
+
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
- *
+ * Simple requests to the tomcat installation
  */
 public class OwbTomcatPluginIT
 {
+    @Test
+    public void testTomcatRequest() throws Exception
+    {
+        DefaultHttpClient httpclient = new DefaultHttpClient();
+        HttpGet httpGet = new 
HttpGet("http://localhost:9081/owbtomcat7it/test.test";);
+
+        HttpResponse response = httpclient.execute(httpGet);
+        Assert.assertNotNull(response);
+        Assert.assertEquals(200, response.getStatusLine().getStatusCode());
+    }
 
 }


Reply via email to