[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: 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 { runtimeBridge.setTestConfiguration(getTestConfiguration()); // 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. Jim On Dec 14, 2009, at 10:26 AM, Mike Edwards wrote:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]