summaryrefslogtreecommitdiffstats
path: root/otest/newlayout/tuscany-policy-test-runner
diff options
context:
space:
mode:
Diffstat (limited to 'otest/newlayout/tuscany-policy-test-runner')
-rw-r--r--otest/newlayout/tuscany-policy-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/otest/newlayout/tuscany-policy-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/otest/newlayout/tuscany-policy-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
index 3e0b6380f5..1f9fa9bbfa 100644
--- a/otest/newlayout/tuscany-policy-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
+++ b/otest/newlayout/tuscany-policy-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);
@@ -202,5 +201,18 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
} catch (IOException e) {
}
}
+
+ 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