diff options
Diffstat (limited to 'sca-java-2.x/trunk/itest/nodes')
3 files changed, 10 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/trunk/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java index c9bd11b3d9..2619dc269b 100644 --- a/sca-java-2.x/trunk/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java @@ -32,17 +32,12 @@ public class HelloworldImpl implements Helloworld { public Helloworld service; @Init - public void initialize(){ + public void initialize() throws Exception{ System.out.println(">>>>>> " + sayHello("init")); } - public String sayHello(String name) { - try { + public String sayHello(String name) throws Exception { return "Hi " + service.sayHello(name); - } catch (Exception e) { - e.printStackTrace(); - return e.getMessage(); - } } } diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java b/sca-java-2.x/trunk/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java index 76f8d4400d..a0710281c9 100644 --- a/sca-java-2.x/trunk/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java @@ -24,6 +24,6 @@ import org.oasisopen.sca.annotation.Remotable; @Remotable public interface Helloworld { - String sayHello(String name); + String sayHello(String name) throws Exception; } diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java index beb38929ca..998492734b 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java @@ -61,7 +61,13 @@ public class StopStartNodesTestCase { client = clientNode.getService(Helloworld.class, "HelloworldClient");
assertNotNull(client);
- assertEquals(true, client.sayHello("Petra").startsWith("Unable to bind"));
+ try {
+ client.sayHello("Petra");
+ fail();
+ } catch (Exception e) {
+ // expected
+ // TODO: better exception than NPE
+ }
serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
serviceNode.start();
|