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