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

Mircea Markus mircea.markus at jboss.com
Tue Sep 15 09:51:39 EDT 2009


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.
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





More information about the infinispan-dev mailing list