diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-25 19:54:40 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-25 19:54:40 +0000 |
commit | e92746899e7e31cbe08fa2b8adaa07e60cd4ff84 (patch) | |
tree | ee40999ef7651b142fe00d66f3cb7b59b61da330 /java/sca/itest/nodes/two-nodes-two-vms-test/src | |
parent | 2143f3e8871c475d443c6c2132e113c6698a8669 (diff) |
Use file paths instead of file URLs as relative paths for file URLs are not supported
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@788492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/nodes/two-nodes-two-vms-test/src')
-rw-r--r-- | java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java b/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java index 6f0c7565e7..b27d16a562 100644 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java +++ b/java/sca/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java @@ -19,67 +19,39 @@ package itest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import itest.nodes.Helloworld; - import java.io.File; -import java.net.URL; -import org.apache.tuscany.sca.node.Contribution; 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; -import org.oasisopen.sca.client.SCAClient; -import org.oasisopen.sca.client.SCAClientFactory; /** * This shows how to test the Calculator service component. */ -public class TwoNodesTestCase{ +public class TwoNodesTestCase { private static Node serviceNode; - private static Node clientNode; @BeforeClass public static void setUpBeforeClass() throws Exception { NodeFactory factory = NodeFactory.newInstance(); - serviceNode = factory.createNode(new URL("file:./server-config.xml")); + serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); serviceNode.start(); - - //clientNode = factory.createNode(new Contribution("client", getJar("../helloworld-client/target"))); - //clientNode.start(); - } - /** - * Get the jar in the target folder without being dependent on the version name to - * make tuscany releases easier - */ - private static String getJar(String targetDirectory) { - File f = new File(targetDirectory); - for (File file : f.listFiles()) { - if (file.getName().endsWith(".jar")) { - return file.toURI().toString(); - } - } - throw new IllegalStateException("Can't find jar in: " + targetDirectory); } - + @Test public void testNothing() throws Exception { - } + } @AfterClass public static void tearDownAfterClass() throws Exception { if (serviceNode != null) { serviceNode.stop(); } - if (clientNode != null) { - clientNode.stop(); - } } } |