Hey,

I'm writing test case about conformance item ASM60002, and haven't got the 
result I expected.


Conformance Item ASM60002
----------------------------------------------------------------------------------------
local : boolean (0..1) �C whether all the components within the composite 
all run in the same operating system process. @local="true" for a 
composite means that all the components within the composite MUST run in 
the same operating system process. [ASM60002] local="false", which is the 
default, means that different components within the composite can run in 
different operating system processes and they can even run on different 
nodes on a network.
----------------------------------------------------------------------------------------

According to the above description, I created the following composite file 
localcomponent.composite with two conponents, one is a local component (
BComponent), the other is remote one(HelloWorldServiceComponent). And the 
"local" attribute is set as "true".
 
localcomponennt.composite
----------------------------------------------------------------------------------------
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://assembly-tests";
        name="Assembly-LocalComponent--Composite" local="true">
    <component name="HelloWorldServiceComponent">
                <service name="HelloWorldService">
                        <interface.java interface="helloworld
.HelloWorldService" />
                        <binding.ws 
uri="http://localhost:8085/HelloWorldService"/>
                </service>
        </component>
    <component name="BComponent">
        <implementation.java class=
"org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
        <property name="someProperty">some b component value</property>
    </component> 
</composite>
----------------------------------------------------------------------------------------

Then I create the testcase to invoke the services of the two components 
individually, and supposed that ServiceRuntimeException exception will be 
thrown. But actually I haven't got any exception, even without any warning 
message in the console. Is there any problem with my testcase? Thanks for 
any help in advance.

Testcase
----------------------------------------------------------------------------------------
/**
* Lines 1036-1037:
* <p>
* local="true" means that all the components must run in the same process. 

* <p>
* ASM60002:
* <p>
* @local="true" for a composite means that all the components within the 
composite MUST run in the same operating system process.
*/
@Test(expected = ServiceRuntimeException.class)
public void ASM60002() throws Exception {
        initDomain("localcomponent.composite");
        HelloWorldService service = ServiceFinder.getService
(HelloWorldService.class, "HelloWorldServiceComponent");
        Assert.assertEquals("Hello, tester", service.getGreetings("tester"
));
        BService bService = ServiceFinder.getService(BService.class, 
"BComponent");
        Assert.assertEquals("SomeStateFromB", bService.getState());
}
----------------------------------------------------------------------------------------


Best Regards
Susan Wan (万淑超)
-------------------------
WebSphere Application Server System Verification Test, IBM China SoftWare 
Development Lab
Tel: 86-10-82453655 
E-mail: [EMAIL PROTECTED] 
Address: 3/F, Diamond Building, ZhongGuanCun Software Park , Dongbeiwang 
West Road No.8, ShangDi, Haidian District, Beijing 100193, PRC

Reply via email to