On Sep 15, 2009, at 8:18 PM, Galder Zamarreno wrote:
On 09/15/2009 03:51 PM, Mircea Markus wrote:
> sweet, thanks for the tip. In JbossCache I did an uglier workaround
> to
> fix this, passed the Class object to the factory that supplied
> CacheManagers, but this approach is much nicer.
Did you apply the workaround in Infinispan as well? If yes, we should
change it. If not, what did you use that for in JBoss Cache?
In JBossCache I used
that to make sure that caches are being closed
between different test classes.
This was more of a sanity check, which is no longer performed in
infinispan.
Well, this has a drawback: if a Test class fails to close an cache
instance, then this will be still 'kept alive' (associated with the
thread basically/thread local) and when the new Test class tries to
create an new cluster it will end up with a bigger one -> most likely
subsequent test will fail.
I suppose
that use might not be relevant in ISPN?
> On Sep 15, 2009, at 1:45 PM, Galder Zamarreno wrote:
>
>>
>>
>> On 09/15/2009 12:35 PM, Mircea Markus wrote:
>>> That's nice!
>>> Does it work with inheritance? I.e. Is there a way to determine the
>>> runtime class (vs defining class) of the given Method object?
>>
>> I think that if you pass an ITestContext, using the getName()
>> method, u
>> can get the runtime class.
>>
>> Example:
>>
>> CacheAPITest:
>>
>> public void testGetMembersInLocalMode(ITestContext context) {
>> System.out.println("Booooooooooo moooooooo " +
>> context.getName());
>> assert cache.getCacheManager().getAddress() == null : "Cache
>> members should be null if running in LOCAL mode";
>> }
>>
>> When I run CacheAPIMVCCTest, it prints:
>>
>> Booooooooooo moooooooo
>> org.infinispan.api.mvcc.repeatable_read.CacheAPIMVCCTest
>>
>> So that way, u can get the runtime class name.
>>
>>> On Sep 15, 2009, at 1:31 PM, Galder Zamarreno wrote:
>>>
>>>> testng will populate it with the test method information
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> 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
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
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