summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-2.0-M3/itest/nodes/two-nodes-test
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-06-16 08:22:06 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-06-16 08:22:06 +0000
commit57485094833282300ce30d05db9222b49a72eee0 (patch)
tree2f0ecaf46d0abe4f3b8fa092fe8155635537a2fa /branches/sca-java-2.0-M3/itest/nodes/two-nodes-test
parentea2e710442179cdb42ef593c34ff691b5acb4145 (diff)
Merge 785108 from 2.x to 2.0 m3 branch to remove the explicit jar version dependency in the nodes itests
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@785109 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-2.0-M3/itest/nodes/two-nodes-test')
-rw-r--r--branches/sca-java-2.0-M3/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/branches/sca-java-2.0-M3/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/branches/sca-java-2.0-M3/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
index 4659b717fb..8352f70e17 100644
--- a/branches/sca-java-2.0-M3/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
+++ b/branches/sca-java-2.0-M3/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
@@ -46,12 +46,26 @@ public class TwoNodesTestCase{
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 = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
serviceNode.start();
- clientNode = factory.createNode(new Contribution("client", new File("../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar").toURI().toString()));
+ 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 testCalculator() throws Exception {
Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");