summaryrefslogtreecommitdiffstats
path: root/otest/newlayout/tuscany-java-caa-test-runner
diff options
context:
space:
mode:
Diffstat (limited to 'otest/newlayout/tuscany-java-caa-test-runner')
-rw-r--r--otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
index 3e0b6380f5..139e8b31fd 100644
--- a/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
+++ b/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
@@ -28,12 +28,11 @@ import java.io.InputStream;
import java.util.Properties;
import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import testClient.TestException_Exception;
import client.RuntimeBridge;
-import client.TestConfiguration;
/**
* An implementation of the Runtime Bridge for the Apache Tuscany SCA runtime (version 2.x)
@@ -127,7 +126,7 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
public void checkError(String testName, Throwable ex) throws Throwable {
String expectedMessage = expectedErrorMessages.getProperty(testName);
- String receivedMessage = ex.getMessage();
+ String receivedMessage = getErrorMessage(ex);//ex.getMessage();
if (expectedMessage == null){
writeMissingMessage(testName, ex);
@@ -203,4 +202,16 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
}
}
+ protected String getErrorMessage(Throwable ex) {
+ String errorMessage = null;
+
+ if (ex instanceof TestException_Exception) {
+ TestException_Exception te = (TestException_Exception) ex;
+ errorMessage = te.getFaultInfo().getMessage();
+ } else {
+ errorMessage = ex.getMessage();
+ }
+
+ return errorMessage;
+ }
} // end class TuscanyRuntimeBridge