diff options
7 files changed, 57 insertions, 33 deletions
diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml index 933aec2636..3d77230541 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml @@ -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"/> diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml index bb65805144..8e7c744940 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml @@ -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 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 4605e62ce4..172f6ec0e1 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 @@ -85,7 +85,7 @@ <executions> <execution> <id>run-samples</id> - <phase>verify</phase> + <phase>test</phase> <goals> <goal>run</goal> </goals> diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml index 7b6d206b7f..dc18cc8ce0 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml @@ -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> 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 index 22bf1c4ecc..15126b9c5d 100644 --- 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 @@ -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 @@ import org.junit.Test; */
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 @@ public class Client { clientNode.stop();
}
}
+
+ public static void main(String[] args) throws Exception {
+ Client.setUpBeforeClass();
+ Client.tearDownAfterClass();
+ }
}
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 index 72e6edb622..0acb42334f 100644 --- 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 @@ -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 @@ import org.junit.Test; */
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 @@ public class Service { serviceNode.stop();
}
}
+
+ public static void main(String[] args) throws Exception {
+ Service.setUpBeforeClass();
+ Service.tearDownAfterClass();
+ }
}
diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java index b27d16a562..b13d25a706 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java @@ -32,14 +32,18 @@ import org.junit.Test; */ 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 @@ public class TwoNodesTestCase { @AfterClass public static void tearDownAfterClass() throws Exception { - if (serviceNode != null) { - serviceNode.stop(); - } +// if (clientNode != null) { +// clientNode.stop(); +// } } } |