You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/12/04 12:30:31 UTC

svn commit: r887161 - in /tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test: pom.xml src/test/java/itest/Client.java src/test/java/itest/Service.java

Author: antelder
Date: Fri Dec  4 11:30:31 2009
New Revision: 887161

URL: http://svn.apache.org/viewvc?rev=887161&view=rev
Log:
Add some separate client and service classes to run the test manually in eclipse

Added:
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
Modified:
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml

Modified: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml?rev=887161&r1=887160&r2=887161&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml Fri Dec  4 11:30:31 2009
@@ -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>    

Added: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java?rev=887161&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java Fri Dec  4 11:30:31 2009
@@ -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();
+        }
+    }
+}

Added: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java?rev=887161&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java Fri Dec  4 11:30:31 2009
@@ -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();
+        }
+    }
+}