summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test')
-rw-r--r--sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java28
-rw-r--r--sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java23
-rw-r--r--sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java18
3 files changed, 49 insertions, 20 deletions
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();
+// }
}
}