[weld-dev] Weld Tests

Ales Justin ales.justin at gmail.com
Fri Sep 30 10:16:16 EDT 2011


>>>>>>> Hi Guys,
>>>>>>> 
>>>>>>> I have just gone through and converted to arquillian the last of the jboss test harness tests in the weld distribution. Unfortunately it is not possible to move all the tests across, as some tests have a dependency on the embedded weld container, which is not available in the incontainer profile (as the AS7 container is used instead). 
>>>>>>> 
>>>>>>> With this is mind, I would like to make some changes to the test suite setup:
>>>>>>> 
>>>>>>> - rename tests-arquillian -> testsuite/integration
>>>>>> 
>>>>>> Sounds good.
>>>>>> 
>>>>>>> - rename tests -> testsuire/unit 
>>>>>> 
>>>>>> I would suggest rewriting the tests as proper integration tests. A lot of this stuff is junk left over from when we were bootstrapping the WebBeans RI project and didn't have any test harness at all to run with.
>>>>> 
>>>>> I am not sure if this is possible, as some of them rely on starting and shutting down the container (org.jboss.weld.tests.unit.cluster.NaiveClusterTest). I know this test has actually picked up problems in the past, so I don't really want to ditch it. 
>>>> 
>>>> Good point. Can we not move this to weld/core then?
>>> 
>>> That might be ok, but it may be a fair bit of code to put in weld core, I think it would almost amount to moving the are container into weld-core. 
>>> 
>>> I am probably not going to get time to work on this for the next week or two anyway, so we have some time to figure it out. 
>> 
>> Actually, why not just put the containers into the integration tests module?
> 
> 
> Because this test needs the embedded container to compile, and arquillian can only deal with one container on the class path, so this would cause problems when running the in container tests which do not have the embedded container on the CP, but the AS7 container instead. 

Doesn't ARQ know how to deal with multiple containers on the classpath,
if you explicitly specify the container in arquillian.xml and then use that container in @TargetsContainer?

This then marks the test against concrete container.
e.g. not depending on the single one picked from cp

-Ales


More information about the weld-dev mailing list