[weld-issues] [JBoss JIRA] (CDITCK-204) TCK Harness property configuration broken

Martin Kouba (JIRA) jira-events at lists.jboss.org
Thu Apr 19 06:36:18 EDT 2012


    [ https://issues.jboss.org/browse/CDITCK-204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12685623#comment-12685623 ] 

Martin Kouba commented on CDITCK-204:
-------------------------------------

The default {{ConfigurationBuilder}} (PropertiesBasedConfigurationBuilder) really collates all the JBoss Test Harness configuration settings from system and Java properties - it's documented in *11.1. JBoss Test Harness Properties*.

However this does not prevent you from using custom {{ConfigurationBuilder}} that uses a different approach. {{ConfigurationFactory}} always looks for user-defined {{ConfigurationBuilder}} first and uses the default one if no such builder is found. So set the system property {{org.jboss.testharness.api.ConfigurationBuilder}} to  FQCN of the custom implementation on the classpath.


                
> TCK Harness property configuration broken
> -----------------------------------------
>
>                 Key: CDITCK-204
>                 URL: https://issues.jboss.org/browse/CDITCK-204
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Infrastructure
>    Affects Versions: 1.0.4.CR2
>            Reporter: Sivakumar Thyagarajan
>
> As per http://docs.jboss.org/cdi/tck/reference/latest/en-US/html/test-harness-configuration.html#test-harness-properties, a custom ConfigurationBuilder or an implementation of the SPI class such as org.jboss.jsr299.tck.spi.Beans could be provided by the TCK executor through a system property specifying the FQCN of the implementation class. 
> However while trying to plug in a custom Beans SPI implementation or a ConfigurationBuilder using the system property, the default PropertiesBasedConfigurationBuilder seems to collate [1] all the properties file in the classpath and include the default implementations (bundled in the porting package or harness) as well.
> >    [testng] Exception in thread "main" java.lang.IllegalArgumentException: More than one implementation of Beans specified by org.jboss.jsr299.tck.spi.Beans, not sure which one to use!
> >    [testng]     at org.jboss.testharness.properties.PropertiesManager.getClassValue(PropertiesManager.java:159)
> >    [testng]     at org.jboss.testharness.properties.PropertiesManager.getInstanceValue(PropertiesManager.java:169)
> >    [testng]     at org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder.getInstanceValue(PropertiesBasedConfigurationBuilder.java:62) 
> This prevents configuration of the TCK to use a custom SPI class implementation and/or ConfigurationBuilder. The only workaround seems to be providing a modified version of the existing porting package class and ensuring that it is loaded ahead.
> [1] 
> [1] http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.test-harness/jboss-test-harness/1.1.0-CR5/org/jboss/testharness/impl/ConfigurationFactory.java#17 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list