summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-12-04 11:30:31 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-12-04 11:30:31 +0000
commitc53b2ffb0c71ea25e3a71adeaa946a205975bbed (patch)
tree7c7ac21e3a271d6c651394001cab636c3b5462ef
parent12bd932fb49e3d12b8e1f247e631f263f308f9d0 (diff)
Add some separate client and service classes to run the test manually in eclipse
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@887161 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml5
-rw-r--r--sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java55
-rw-r--r--sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java57
3 files changed, 117 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml
index 1ffccd9fd5..4605e62ce4 100644
--- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml
+++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml
@@ -31,6 +31,11 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-endpoint-tribes</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
new file mode 100644
index 0000000000..22bf1c4ecc
--- /dev/null
+++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
@@ -0,0 +1,55 @@
+/*
+ * 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 org.apache.tuscany.sca.domain.node.DomainNode;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class Client {
+
+ private static DomainNode clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+// NodeFactory factory = NodeFactory.newInstance();
+//
+// serviceNode = factory.createNode(new File("client-config.xml").toURI().toURL());
+// serviceNode.start();
+
+ clientNode = new DomainNode("tribes:default", new String []{"../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"});
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
new file mode 100644
index 0000000000..28a47ae175
--- /dev/null
+++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.tuscany.sca.domain.node.DomainNode;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class Service {
+
+// private static Node serviceNode;
+ private static DomainNode serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+// NodeFactory factory = NodeFactory.newInstance();
+//
+// serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL());
+// serviceNode.start();
+
+ serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"});
+
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}