[infinispan-dev] A tip: Using a random word generator to generate uncommon test data

Galder Zamarreno galder.zamarreno at redhat.com
Tue Sep 15 13:18:17 EDT 2009



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? 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 at 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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
> _______________________________________________
> 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