From b44e1dfca7b0f0aa20117eca55e62238ac618edb Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 10 Dec 2009 11:57:00 +0000 Subject: Set up the test to fail the maven build on errors. I'm now seeing some RMI problems with this test. Not sure if it's related to how it's now running. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@889216 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/nodes/two-nodes-two-vms-test/build.xml | 4 ++-- .../itest/nodes/two-nodes-two-vms-test/client.xml | 12 ++++------ .../itest/nodes/two-nodes-two-vms-test/pom.xml | 2 +- .../itest/nodes/two-nodes-two-vms-test/server.xml | 3 --- .../src/test/java/itest/Client.java | 28 +++++++++++++++++----- .../src/test/java/itest/Service.java | 23 ++++++++++++------ .../src/test/java/itest/TwoNodesTestCase.java | 18 ++++++++------ 7 files changed, 57 insertions(+), 33 deletions(-) (limited to 'sca-java-2.x/trunk/itest') diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml index 933aec2636..3d77230541 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/build.xml @@ -20,12 +20,12 @@ - + - + diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml index bb65805144..8e7c744940 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/client.xml @@ -21,13 +21,11 @@ - - - - - - - + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml index 4605e62ce4..172f6ec0e1 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml @@ -85,7 +85,7 @@ run-samples - verify + test run diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml index 7b6d206b7f..dc18cc8ce0 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/server.xml @@ -22,9 +22,6 @@ - - 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(); + } } diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java index 72e6edb622..0acb42334f 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.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,17 +33,17 @@ import org.junit.Test; */ public class Service { -// private static Node serviceNode; - private static DomainNode serviceNode; + private static Node serviceNode; +// private static DomainNode serviceNode; @BeforeClass public static void setUpBeforeClass() throws Exception { -// NodeFactory factory = NodeFactory.newInstance(); -// -// serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); -// serviceNode.start(); + NodeFactory factory = NodeFactory.newInstance(); + + serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); + serviceNode.start(); - serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"}); +// serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"}); } @@ -56,4 +60,9 @@ public class Service { serviceNode.stop(); } } + + public static void main(String[] args) throws Exception { + Service.setUpBeforeClass(); + Service.tearDownAfterClass(); + } } diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java index b27d16a562..b13d25a706 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java @@ -32,14 +32,18 @@ import org.junit.Test; */ public class TwoNodesTestCase { - private static Node serviceNode; + private static Node clientNode; @BeforeClass public static void setUpBeforeClass() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); + + // Get the service running in a separate VM + //Runtime.getRuntime().exec("ant"); + + //NodeFactory factory = NodeFactory.newInstance(); - serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); - serviceNode.start(); + //clientNode = factory.createNode(new File("client-config.xml").toURI().toURL()); + //clientNode.start(); } @@ -50,8 +54,8 @@ public class TwoNodesTestCase { @AfterClass public static void tearDownAfterClass() throws Exception { - if (serviceNode != null) { - serviceNode.stop(); - } +// if (clientNode != null) { +// clientNode.stop(); +// } } } -- cgit v1.2.3