Thanks for this.
----- Original Message -----
From: "Galder Zamarreño" <galder(a)jboss.org>
To: "infinispan -Dev List" <infinispan-dev(a)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/or...
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/or...
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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev