You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2010/07/16 11:21:47 UTC
svn commit: r964724 - in
/tuscany/sca-java-2.x/trunk/itest/policy/matching/src:
main/resources/org/apache/tuscany/sca/policy/matching/helloworld/
test/java/org/apache/tuscany/sca/policy/matching/
Author: slaws
Date: Fri Jul 16 09:21:45 2010
New Revision: 964724
URL: http://svn.apache.org/viewvc?rev=964724&view=rev
Log:
Fix test case to take account of stricter policy checks and also apparent inconsistencies in the WS Policy namespace in the code.
Modified:
tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml
tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite
tuscany/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java
Modified: tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml?rev=964724&r1=964723&r2=964724&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml (original)
+++ tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml Fri Jul 16 09:21:45 2010
@@ -20,7 +20,7 @@
<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<intent name="testIntent1" constrains="sca:binding" intentType="interaction"/>
@@ -52,14 +52,16 @@
<policySet name="testPolicy3"
provides="tuscany:testIntent6"
appliesTo="//binding | //implementation">
- <wsp:ExactlyOne>
- <wsp:All>
- <tuscany:jdkLogger name="test.logger">
- <tuscany:logLevel>FINE</tuscany:logLevel>
- <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
- </tuscany:jdkLogger>
- </wsp:All>
- </wsp:ExactlyOne>
+ <wsp:Policy>
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
</policySet>
</definitions>
\ No newline at end of file
Modified: tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite?rev=964724&r1=964723&r2=964724&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite (original)
+++ tuscany/sca-java-2.x/trunk/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite Fri Jul 16 09:21:45 2010
@@ -75,7 +75,7 @@
<component name="HelloWorldService2">
<implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldService"/>
- <service name="HelloWorld" requires="tuscany:testIntent1"/>
+ <service name="HelloWorld" requires="tuscany:testIntent1" policySets="tuscany:testPolicy1"/>
</component>
<component name="HelloWorldService3">
Modified: tuscany/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java?rev=964724&r1=964723&r2=964724&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java Fri Jul 16 09:21:45 2010
@@ -118,7 +118,7 @@ public class MatchingTestCase {
helloWorld.getGreetings("petra");
fail("Exception expected");
} catch (Exception ex) {
- assertTrue(ex.getMessage().indexOf("No match because the policy sets on either side have policies in differnt languages {http://www.w3.org/ns/ws-policy}ExactlyOne and {http://tuscany.apache.org/xmlns/sca/1.1}jdkLogger") > -1);
+ assertTrue(ex.getMessage().indexOf("No match because the policy sets on either side have policies in differnt languages {http://schemas.xmlsoap.org/ws/2004/09/policy}Policy and {http://tuscany.apache.org/xmlns/sca/1.1}jdkLogger") > -1);
}
}