summaryrefslogtreecommitdiffstats
path: root/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-22 08:47:14 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-22 08:47:14 +0000
commitbd8aeea9cb8b4b9534a863ba7e00a7649e6f4dad (patch)
tree0c20e52695e7a12683fd28602bf45d81d62d6c2d /java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
parente9ede437cd480323eaf890dabda2b2266b0571b5 (diff)
FIx up the error message comparison so that shorter expected messages can be truncated to match as well as just comparing substrings. We've now quite a lot of different ways to match the msgs both within and across the assembly and caa tests so we should clean this up at some point
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@828415 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
index 93dbe4412c..fa4f6f6dd4 100644
--- a/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
+++ b/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
@@ -166,7 +166,11 @@ public class TuscanyRuntimeBridge implements RuntimeBridge {
// and where the only relevant part is the start of the message - in this case the expected
// message only contains the stem section which is unchanging...
if( receivedMessage.length() > expectedMessage.length() ) {
- assertTrue("Received message should contain the expected message", receivedMessage.contains(expectedMessage));
+ if (receivedMessage.contains(expectedMessage)) {
+ return;
+ } else {
+ receivedMessage = receivedMessage.substring(0, expectedMessage.length() );
+ }
return;
} // end if