Thanks Stuart and Bruno! Stuart, your suggestion works indeed!! Pete had some recommendations as well and it now seems like this issue has been resolved!

Much appreciated everyone,
Vladimir
On 12-03-28 9:48 PM, Stuart Douglas wrote:
This issue is in org.infinispan.cdi.CDIDistributedTaskLifecycle 

This class is re-used for both tests, however it only gets the current bean manager once at creation time, so the second test is run against the first tests (closed) bean manager. 

Using InfinispanExtension.getExtension().getRegisteredBeanManager() to get the bean manager each time allows the tests to pass.

Stuart



On 29/03/2012, at 7:56 AM, Bruno Georges wrote:

adding Stuart
On 29 Mar 2012, at 08:23, Vladimir Blagojevic wrote:

Hi,

I think I have a decent solution for testing of distributed execution and CDI in the place now. Galder helped out a lot! However, I still can not bridge the last remaining mystery: I have two tests WordCountMapReduceCDITest and DistributedExecutorCDITest. When both tests are enabled
WordCountMapReduceCDITest fails as it is run second. If only either one of the tests is enabled - everything works as expected.

Pick up pull request at https://github.com/infinispan/infinispan/pull/982 , first maven install core and then proceed to cdi/extension to give test suite a run. You can see the root of the failure in surefire reports. Weld somehow cannot resolve bean passed to InjectionTarget inject method.

Much appreciated,
Vladimir

Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001324 Argument bean must not be null
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:657)
	at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
	at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703)
	at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712)
	at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:106)
	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
	at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:102)
	at org.infinispan.cdi.CDIDistributedTaskLifecycle.onPreExecute(CDIDistributedTaskLifecycle.java:46)
	at org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute(DistributedTaskLifecycleService.java:80)
	at org.infinispan.commands.read.MapReduceCommand.perform(MapReduceCommand.java:144)
 






_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev