summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-08-25 17:11:37 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-08-25 17:11:37 +0000
commit5dbdd580743b49879184d5c5735889977891a2fd (patch)
treedabe6556a6fba680e1fdc4205a8368922ba1dc63 /sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java
parentcf07a27562e816156582b1ac7d3a0e72611dbd8e (diff)
Extend test to call the callback and add (commented out) changes to demonstrate the danger of retrieving and endpoint for a component that hosts callback endpoints.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1161646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java')
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java b/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java
index 1864a8139d..89ca0314c7 100644
--- a/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java
@@ -80,13 +80,14 @@ public class InerfaceMatchTestCase {
String [] contributions = {"./target/classes"};
Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
- "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite",
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MatchDistributedClient.composite",
contributions);
node1.start();
Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
"org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MatchDistributedService.composite",
contributions);
+
// for default binding on node2 to use a different port from node 1(which will default to 8080
((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
@@ -99,9 +100,17 @@ public class InerfaceMatchTestCase {
String response = local.foo1(po);
Assert.assertEquals("AComponent", response);
} catch (ServiceRuntimeException ex){
- Assert.fail("Unexpected exception " + ex.toString());
+ Assert.fail("Unexpected exception with foo " + ex.toString());
}
+ try {
+ local.callback("Callback");
+ String response = local.getCallbackValue();
+ Assert.assertEquals("Callback", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with callback" + ex.toString());
+ }
+
node1.stop();
node2.stop();