summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/samples')
-rw-r--r--sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java10
-rw-r--r--sca-java-2.x/trunk/samples/running-tuscany/embedded-jse/src/test/java/launcher/LauncherTestCase.java7
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);
+ }
}