From c53bddb7cd7eb1f06a3a8a4f43e590b5cea28aa1 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 20 Oct 2009 23:08:05 +0000 Subject: Fix for otest JCA_800? ... git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@827831 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/resources/tuscany-oasis-sca-tests-errors.properties | 9 +++++++++ .../tjava/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'java/sca/otest') diff --git a/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties index 9a3b382a0a..c92ed71346 100644 --- a/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties +++ b/java/sca/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -45,3 +45,12 @@ JCA_10050=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oa JCA_10051=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: JCA90059 The array of interfaces or classes specified by the value attribute of the @Service annotation JCA_10052=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: JCA90060 The value of each element in the @Service names array MUST be unique amongst all the other element values in the array JCA_11005=* org.apache.tuscany.sca.contribution.processor.ContributionReadException: java.io.FileNotFoundException: C:TuscanySVN2.x-trunkotestnewlayouttuscany-java-caa-test-runner..sca-java-caaJCA_11005targetJCA_11005.zip (The system cannot find the path specified) +# Intent and PolicySet related tests +JCA_8001=[POL40009] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent2 and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent1 are mutually exclusive +JCA_8002=Method that is not an SCA reference cannot have policySet/intent annotations +JCA_8003=Field that is not an SCA reference cannot have policySet/intent annotations +JCA_8004=Constructor parameter that is not an SCA reference cannot have policySet/intent annotations +JCA_8006=[POL40009] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent2 and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent1 are mutually exclusive +JCA_8008=Method that is not an SCA reference cannot have policySet/intent annotations +JCA_8009=Field that is not an SCA reference cannot have policySet/intent annotations +JCA_8010=Constructor parameter that is not an SCA reference cannot have policySet/intent annotations 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 baabac9697..93dbe4412c 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 @@ -19,6 +19,7 @@ package org.apache.tuscany.sca.otest; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.BufferedWriter; @@ -165,8 +166,8 @@ 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() ) { - // Truncate the received message to the length of the expected message - receivedMessage = receivedMessage.substring(0, expectedMessage.length() ); + assertTrue("Received message should contain the expected message", receivedMessage.contains(expectedMessage)); + return; } // end if if (!expectedMessage.equals(receivedMessage)) { -- cgit v1.2.3