You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/10/22 10:47:15 UTC
svn commit: r828415 -
/tuscany/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
Author: antelder
Date: Thu Oct 22 08:47:14 2009
New Revision: 828415
URL: http://svn.apache.org/viewvc?rev=828415&view=rev
Log:
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
Modified:
tuscany/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
Modified: tuscany/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java?rev=828415&r1=828414&r2=828415&view=diff
==============================================================================
--- tuscany/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java (original)
+++ tuscany/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java Thu Oct 22 08:47:14 2009
@@ -166,7 +166,11 @@
// 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