summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java10
-rw-r--r--java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java8
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();
}