summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-23 08:05:38 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-23 08:05:38 +0000
commitac64fbe1c51844611a79121ae516a1e0b0c64c31 (patch)
treeb60986f8b2b69963e3c0dfb547c3716bcda330f7 /sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client
parent4d017c5ed0476dc90a75f988ec486619e1465ee5 (diff)
Remove the idstribution webapp tests. These didn't work well for a number of reasons. they didn't test what was in the distribution as the distribution doesn't include the built webapps. Because they need a dependency on the distribution all the all distro dependencies get on the classpath so they're not testing what is included in the webapp. There seems to be bugs oin the cargo plugin so that it doesn't free up all its resourecs till the very end of the build
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@937184 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client')
-rw-r--r--sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/pom.xml205
-rw-r--r--sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java75
2 files changed, 0 insertions, 280 deletions
diff --git a/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/pom.xml b/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/pom.xml
deleted file mode 100644
index fbb6fb2b3d..0000000000
--- a/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/pom.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-distribution</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-distribution-webapp-helloworld-js-client</artifactId>
- <name>Apache Tuscany SCA iTest Distribution Webapp helloworld-js-client</name>
-
- <profiles>
- <profile>
- <id>distribution</id>
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>itest-bin-distro-unzip</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>sample-helloworld-js-client-webapp</artifactId>
- <type>war</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>net.sourceforge.htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>2.6</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- <version>6.1.19</version>
- <type>pom</type>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>compile</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <wait>false</wait>
- <container>
- <!--
- you can call the containerid anything that doesn't start with 'jetty' (Jetty will work fine)
- if it starts with 'jetty' it will use the automatic dependency mechanism which you don't
- want
- -->
- <containerId>latest-jetty6x</containerId>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer
- </implementation>
- <type>embedded</type>
- <dependencies>
- <!-- add all the other dependencies that the embedded jetty server needs here -->
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler-jdt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-api-2.0</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-el</groupId>
- <artifactId>commons-el</artifactId>
- </dependency>
-
- </dependencies>
- </container>
- <!-- Uncomment the following to enable Tomcat container -->
- <!--
- <container>
- <containerId>tomcat6x</containerId>
- <home>/Tomcat/apache-tomcat-6.0.18</home>
- </container>
- -->
- <configuration>
- <implementation>org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration
- </implementation>
-
- <home>${project.build.directory}/cargo-jetty</home>
- <properties>
- <!--
- NOTE: remote debugging doesn't work with the embedded Jetty container. To remote debug
- uncomment/comment the container above to be the Tomcat container and set home to point
- to your local Tomcat installation
- -->
- <cargo.jvmargs><![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y]]></cargo.jvmargs>
- <cargo.servlet.port>8085</cargo.servlet.port>
- <context>helloworld-jsp</context>
- </properties>
- <deployables>
- <deployable>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>sample-helloworld-js-client-webapp</artifactId>
- <type>war</type>
- <properties>
- <context>helloworld-js-client</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java b/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java
deleted file mode 100644
index 099b442050..0000000000
--- a/sca-java-2.x/trunk/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package itest;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-
-import org.junit.Test;
-
-/**
- * Verfiy the serverside code is working, not sure how to easily itest the browser javascript code
- */
-public class HelloworldTestCase {
-
- @Test
- public void testA() throws MalformedURLException, IOException {
-
- URL url = new URL("http://localhost:8085/helloworld-js-client/org.oasisopen.sca.componentContext.js/foo/call/plaincall/service.sayHello.dwr");
- URLConnection conn = url.openConnection();
- conn.setDoOutput(true);
- OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
-
- // to find this run the sample through TCPMON to capture the messages
-
- String data = URLEncoder.encode("callCount", "UTF-8") + "=" + URLEncoder.encode("1", "UTF-8");
- data += "&" + URLEncoder.encode("page", "UTF-8") + "=" + URLEncoder.encode("/helloworld-js-client/", "UTF-8");
- data += "&" + URLEncoder.encode("httpSessionId", "UTF-8") + "=" + URLEncoder.encode("", "UTF-8");
- data += "&" + URLEncoder.encode("scriptSessionId", "UTF-8") + "=" + URLEncoder.encode("A023DA664E56F075491BE1B87B37B02671", "UTF-8");
- data += "&" + URLEncoder.encode("c0-scriptName", "UTF-8") + "=" + URLEncoder.encode("service", "UTF-8");
- data += "&" + URLEncoder.encode("c0-methodName", "UTF-8") + "=" + URLEncoder.encode("sayHello", "UTF-8");
- data += "&" + URLEncoder.encode("c0-id", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8");
- data += "&" + URLEncoder.encode("c0-param0", "UTF-8") + "=" + URLEncoder.encode("string:petra", "UTF-8");
- data += "&" + URLEncoder.encode("batchId", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8");
-
- wr.write(data);
- wr.flush();
-
- BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
- rd.readLine(); // throw 'allowScriptTagRemoting is false.';
- rd.readLine(); //#DWR-INSERT
- rd.readLine(); //#DWR-REPLY
- String line = rd.readLine(); // dwr.engine._remoteHandleCallback('0','0',"Hello petra");
- wr.close();
- rd.close();
-
- assertTrue(line.endsWith("\"Hello petra\");"));
-
- }
-
-}