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

svn commit: r889216 - in /tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test: build.xml client.xml pom.xml server.xml src/test/java/itest/Client.java src/test/java/itest/Service.java src/test/java/itest/TwoNodesTestCase.java

Author: slaws
Date: Thu Dec 10 11:57:00 2009
New Revision: 889216

URL: http://svn.apache.org/viewvc?rev=889216&view=rev
Log:
Set up the test to fail the maven build on errors. I'm now seeing some RMI problems with this test. Not sure if it's related to how it's now running. 

Modified:
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml
    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
    tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java

Modified: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml?rev=889216&r1=889215&r2=889216&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml Thu Dec 10 11:57:00 2009
@@ -20,12 +20,12 @@
 	
     <target name="run"> 
     	
-       <parallel>
+       <parallel failonany="true">
 
             <daemons>
                <ant antfile="server.xml"/>
             </daemons>
-
+      	
             <sequential>
                 <sleep seconds="4"/>
                 <ant antfile="client.xml"/>

Modified: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml?rev=889216&r1=889215&r2=889216&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml Thu Dec 10 11:57:00 2009
@@ -21,13 +21,11 @@
 	<!--echo>${runtime_classpath}</echo-->
 
 	<target name="run">
-		<java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true">
-			<!--jvmarg value="-Djava.util.logging.config.file=../logging.properties"/-->
-			<arg value="-ttl"/>
-			<arg value="0"/>
-			<arg value="-node"/>
-			<arg value="./client-config.xml"/>
-		</java>
+		<java classpath="${runtime_classpath};./target/test-classes" 
+			  classname="itest.Client" 
+			  fork="true"
+			  failonerror="true">
+		</java>		
 	</target>
 
 </project>
\ No newline at end of file

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=889216&r1=889215&r2=889216&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 Thu Dec 10 11:57:00 2009
@@ -85,7 +85,7 @@
                 <executions>
                     <execution>
                         <id>run-samples</id>
-                        <phase>verify</phase>
+                        <phase>test</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>

Modified: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml?rev=889216&r1=889215&r2=889216&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml Thu Dec 10 11:57:00 2009
@@ -22,9 +22,6 @@
 
 	<target name="run">
 		<java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true">
-			<!--jvmarg value="-Djava.util.logging.config.file=../logging.properties"/-->
-			<!--arg value="-ttl"/>
-			<arg value="0"/-->
 			<arg value="-node"/>
 			<arg value="./server-config.xml"/>
 		</java>

Modified: 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=889216&r1=889215&r2=889216&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java Thu Dec 10 11:57:00 2009
@@ -19,7 +19,11 @@
 
 package itest;
 
+import java.io.File;
+
 import org.apache.tuscany.sca.domain.node.DomainNode;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -29,16 +33,23 @@
  */
 public class Client {
 
-    private static DomainNode clientNode;
+    private static Node clientNode;
+//    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();
+        NodeFactory factory = NodeFactory.newInstance();
+
+        clientNode = factory.createNode(new File("client-config.xml").toURI().toURL());
         
-        clientNode = new DomainNode("tribes:default", new String []{"../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"});
+        try {
+            clientNode.start();
+        } catch (Exception ex){
+            ex.printStackTrace();
+            throw ex;
+        }
+        
+//        clientNode = new DomainNode("tribes:default", new String []{"../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"});
     }
 
     @Test
@@ -52,4 +63,9 @@
             clientNode.stop();
         }
     }
+    
+    public static void main(String[] args) throws Exception {
+        Client.setUpBeforeClass();
+        Client.tearDownAfterClass();
+    }
 }

Modified: 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=889216&r1=889215&r2=889216&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java Thu Dec 10 11:57:00 2009
@@ -19,7 +19,11 @@
 
 package itest;
 
+import java.io.File;
+
 import org.apache.tuscany.sca.domain.node.DomainNode;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -29,17 +33,17 @@
  */
 public class Service {
 
-//    private static Node serviceNode;
-    private static DomainNode serviceNode;
+    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();
+        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"});
+//        serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"});
 
     }
 
@@ -56,4 +60,9 @@
             serviceNode.stop();
         }
     }
+    
+    public static void main(String[] args) throws Exception {
+        Service.setUpBeforeClass();
+        Service.tearDownAfterClass();
+    }    
 }

Modified: tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java?rev=889216&r1=889215&r2=889216&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java Thu Dec 10 11:57:00 2009
@@ -32,14 +32,18 @@
  */
 public class TwoNodesTestCase {
 
-    private static Node serviceNode;
+    private static Node clientNode;
 
     @BeforeClass
     public static void setUpBeforeClass() throws Exception {
-        NodeFactory factory = NodeFactory.newInstance();
+        
+        // Get the service running in a separate VM
+        //Runtime.getRuntime().exec("ant");
+        
+        //NodeFactory factory = NodeFactory.newInstance();
 
-        serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL());
-        serviceNode.start();
+        //clientNode = factory.createNode(new File("client-config.xml").toURI().toURL());
+        //clientNode.start();
 
     }
 
@@ -50,8 +54,8 @@
 
     @AfterClass
     public static void tearDownAfterClass() throws Exception {
-        if (serviceNode != null) {
-            serviceNode.stop();
-        }
+//        if (clientNode != null) {
+//            clientNode.stop();
+//        }
     }
 }