[infinispan-dev] ISPN-ARQUILLIAN - embedded mode

Galder Zamarreño galder at redhat.com
Mon Sep 26 09:50:15 EDT 2011


On Sep 22, 2011, at 2:45 PM, Martin Gencur wrote:

> Hi,
> I'm currently implementing support for testing of embedded caches in
> https://github.com/mgencur/infinispan-arquillian-container project and
> would like to discuss future steps.

Are you expecting to host/maintain this separate from the Infinispan source code?

If not, wouldn't it make sense for it to leave within Infinispan as a separate module(s), preferably just one?

It'd make it easier to maintain...

> 
> As mentioned in http://community.jboss.org/message/551784, the tests
> should look like this:
> 
> @RunWith(Arquillian.class)
> class TestClass {
> 
>   @InfinispanResource
>   DatagridManager datagridManager;
> 
>   @Before
>   void setup() {
>        CacheContainer cm1 = ...
>        CacheContainer cm2 = ...
>        datagridManager.registerCacheManager(cm1, cm2);    
>   }
> 
>   @Test
>   void testMethod() {
>        datagridManager.cache(index).put(xx)
>        datagridManager.manager(index).getStatus()
>        datagridManager.tm(cache)...
>        ...
>   }
> }//TestClass
> 
> where the DatagridManager would be basically class with functionality of
> MultipleCacheManagersTest class (org.infinispan.core.test package).
> 
> I would basically copy the following classes to the new project and do
> some changes (removing all testng annotations etc.):

Why copy? Shouldn't they be migrated over? 

The problem with copying is that you're gonna have to keep them in sync which is a PITA, but maybe you're just seeing this as a 1st step?

> 
> - AbstractCacheTest.java
> - AbstractInfinispanTest.java
> - MultipleCacheManagersTest.java (renamed to DatagridManager)
> 
> The project would depend on 
> infinispan-core-5.1.0.ALPHA2-tests.jar so all the other helper classes
> (being used from those mentioned above) would be downloaded with this
> jar.

I'd then expect the rest of modules to depend on the Infinispan Arquillian module/project, right?

> 
> This is because all these test classes are changing quite often so I'm
> trying to copy the smallest possible number of classes and leave the
> rest in infinispan-core. Later, when I want to update them, it will be
> just a matter of changing of 2-3 classes.
> 
> 
> What do you think about this approach?
> 
> 
> Thanks for each reply
> 
> 
> -- 
> Martin Gencur
> --
> JBoss QE, Enterprise Data Grid
> Desk phone: +420 532 294 192, ext. 62192
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list