OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [sca-assembly] Another conformance test question

OK, now I'm more confused. I may have not been clear in my explanation. There are several things I noticed about the test suite runner:

1. Contribution locations could be modeled more explicitly through the use of URLs, which would also eliminate the amount of code RuntimeBridge implementations are required to supply 
2. How configuration information is passed to the RuntimeBridge implementation and processed is confusing (at least to me) primarily because it is passed in multiple times in different ways

For the first item, my suggestion was to refactor TestConfiguration to use List<URL> for the contribution locations. In other words, the RuntimeBridge would have a list of URLs passed to it as opposed to making assumptions about contribution Strings and performing character substitutions.  This would remove code like this snippet:

    protected String[] getContributionURIs(String contributionLocation) throws Exception {
     String[] locations;
     locations = testConfiguration.getContributionNames();
     if( locations != null && contributionLocation != null ) {
     for( int i=0; i < locations.length; i++ ) {
     String aLocation = contributionLocation.replaceAll("%1", locations[i]);
    locations[i] = aLocation;
     } // end for      
     } else {
     if( locations == null ) {
         // No contribution specified - throw an Exception
     throw new Exception("Unable to start SCA runtime - no contribution supplied - error");
     } else {
     // No contribution location supplied - throw an Exception
     throw new Exception("Unable to start SCA runtime - no contribution location supplied - error");
     } // end if 
     } // end if
     return locations;

In terms of the second item,  BaseJAXWSTestRunner contains the following (extracted): 

    public void setUp() throws Throwable {
     // Don't proceed to run the test unless the contribution loaded successfully... 
     proceed = false;
     try {
     if ( startContribution() ) proceed = true; 
     } catch (Exception e) {

   protected boolean startContribution() throws Exception {
     return runtimeBridge.startContribution(configProperties.getProperty(CONTRIBUTION_LOCATION), testConfiguration.getContributionNames());

In the above, if RuntimeBridge.setTestConfiguration(getTestConfiguration()) is called followed by runtimeBridge.startContribution(configProperties.getProperty(CONTRIBUTION_LOCATION), testConfiguration.getContributionNames()) the contribution names are passed twice. It seems RuntimeBridge.setTestConfiguration(TestConfiguration) be eliminated and RuntimeBridge.startContribution(..) can be refactored as:

RuntimeBridge.startContribution(TestConfiguration configuration)

This would have the effect of keeping configuration in one place and simplifying the requirements placed on RuntimeBridge implementations. 


On Dec 14, 2009, at 10:26 AM, Mike Edwards wrote:


The reason that the contribution names are passed in this way is that the computation of the URLs for the
contributions is handled generically in the base test class.  

At the moment, the runtime specific code does not have to handle the properties file that allows things to
be configured.  I suppose this could be changed but I don't see any particular advantage.

Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431  
Email:  mike_edwards@uk.ibm.com

From: Jim Marino <jim.marino@gmail.com>
To: OASIS Assembly <sca-assembly@lists.oasis-open.org>
Date: 13/12/2009 21:29
Subject: [sca-assembly] Another conformance test question

Sorry for sending these comments piecemeal...

Why are contribution names passed to:

RuntimeBridge.startContribution(String contributionLocation,    
String[] contributionNames)

when they appear to be the same as those set in:

RuntimeBridge.setTestConfiguration(TestConfiguration testConfiguration)?

Assuming they are the same,  I think it would be clearer to pass an  
immutable object to the startContribution method such as:

RuntimeBridge.startContribution(TestConfiguration configuration)


To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  Follow this link to all your TCs in OASIS at:

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]