[infinispan-dev] withTx and withCacheManager test helper methods
Mircea Markus
mmarkus at redhat.com
Mon Feb 20 05:39:11 EST 2012
Thanks for this.
----- Original Message -----
> From: "Galder Zamarreño" <galder at jboss.org>
> To: "infinispan -Dev List" <infinispan-dev at lists.jboss.org>
> Sent: Monday, February 20, 2012 9:12:41 AM
> Subject: [infinispan-dev] withTx and withCacheManager test helper methods
>
> Hi all,
>
> Not sure if you've noticed but I've created a couple of helper
> methods in TestingUtil:
>
> 1.
> https://github.com/galderz/infinispan/blob/t_1869_m/core/src/test/java/org/infinispan/test/TestingUtil.java#L1219
>
> The aim of this method is to make sure that a portion of code can be
> executed within a transaction making sure that the right transaction
> lifecycle pattern is used that guarantees that the transaction will
> either be committed or rollbacked.
>
> 2.
> https://github.com/galderz/infinispan/blob/t_1869_m/core/src/test/java/org/infinispan/test/TestingUtil.java#L1232
>
> Sometimes you might wanna start a cache manager within a method, for
> example, to test some configuration validation. This method
> guarantees that a cache manager created will be stopped, hence
> avoids code where cache managers are started and stopping them is
> forgotten. This is a new method I've just added as part of
> ISPN-1869.
>
> There're examples of using these methods in the test source code.
>
> Cheers,
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
More information about the infinispan-dev
mailing list