diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-25 16:42:24 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-25 16:42:24 +0000 |
commit | 89cac1fb2fd8f1dcbd38b0084a1083cd0b7054b5 (patch) | |
tree | ec59d58344e5cc15568b7beaee9345760a86fea9 /java/sca/itest | |
parent | 9220101a1ed9af6577f49bbb4f80526bb77cbf75 (diff) |
Make the two nodes indepent of the maven pom versions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@788419 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest')
-rw-r--r-- | java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java | 10 | ||||
-rw-r--r-- | java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java index 256f601a95..1c787261eb 100644 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java +++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java @@ -25,9 +25,9 @@ import itest.nodes.Helloworld; import java.io.File;
-import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
@@ -49,9 +49,11 @@ public class ClientNode{ runner.beforeClass();
System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
NodeFactory factory = NodeFactory.newInstance();
- clientNode = factory.createNode(new Contribution("client", new File("../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar").toURI().toString()));
- clientNode.start();
- Thread.sleep(2000);
+ NodeConfiguration conf =
+ factory.createNodeConfiguration().setURI("clientNode")
+ .addContribution("client", new File("../helloworld-client/target/classes").toURI().toString());
+ clientNode = factory.createNode(conf).start();
+ Thread.sleep(1000);
}
@Test
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java index b3224be86b..ec1d8636aa 100644 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java +++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java @@ -21,9 +21,9 @@ package itest; import java.io.File;
-import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -38,8 +38,10 @@ public class ServiceNode{ public static void setUpBeforeClass() throws Exception {
System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
NodeFactory factory = NodeFactory.newInstance();
- serviceNode = factory.createNode(new Contribution("service", new File("../helloworld-service/target/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar").toURI().toString()));
- serviceNode.start();
+ NodeConfiguration conf =
+ factory.createNodeConfiguration().setURI("serviceNode")
+ .addContribution("service", new File("../helloworld-service/target/classes").toURI().toString());
+ serviceNode = factory.createNode(conf).start();
}
|