diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-15 17:41:56 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-15 17:41:56 +0000 |
commit | 4f66e17b36cf23a25d3930927aecc113633a611b (patch) | |
tree | e35b40884b03a78a5c465d86b90a87b3c9c52e8b /sca-java-2.x/trunk | |
parent | 34ea5dac5d95d94a9acbb4453dfeb097598e63a1 (diff) |
Run up the async sample from the embedded launcher
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1023034 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
2 files changed, 16 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java b/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java index f27bf7f7f4..351ba9c5ef 100644 --- a/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java +++ b/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java @@ -65,6 +65,11 @@ public class CalculatorServiceProxyImpl implements CalculatorServiceSync { while (!response.isDone()){ System.out.println("Waiting for poll"); + try { + Thread.sleep(500); + } catch (Exception ex) { + // do nothing + } } try { @@ -84,6 +89,11 @@ public class CalculatorServiceProxyImpl implements CalculatorServiceSync { while (!future.isDone()){ System.out.println("Waiting for callback"); + try { + Thread.sleep(500); + } catch (Exception ex) { + // do nothing + } } return result; diff --git a/sca-java-2.x/trunk/samples/running-tuscany/embedded-jse/src/test/java/launcher/LauncherTestCase.java b/sca-java-2.x/trunk/samples/running-tuscany/embedded-jse/src/test/java/launcher/LauncherTestCase.java index acef078467..4c6a93f870 100644 --- a/sca-java-2.x/trunk/samples/running-tuscany/embedded-jse/src/test/java/launcher/LauncherTestCase.java +++ b/sca-java-2.x/trunk/samples/running-tuscany/embedded-jse/src/test/java/launcher/LauncherTestCase.java @@ -53,5 +53,10 @@ public class LauncherTestCase { @Test
public void testImplementationScriptCalculator() throws Exception {
JSELauncherImplementationScriptCalculator.main(null);
- }
+ }
+
+ @Test
+ public void testImplementationJavaCalculatorAsync() throws Exception {
+ JSELauncherImplementationJavaCalculatorAsync.main(null);
+ }
}
|