[infinispan-dev] Change AbstractInfinispanTest.nullifyInstanceFields method name to zzzNullifyInstanceFields

Vladimir Blagojevic vblagoje at redhat.com
Mon Oct 19 11:27:07 EDT 2009


On 09-10-19 10:17 AM, Galder Zamarreno wrote:
>
> On 10/19/2009 03:46 PM, Vladimir Blagojevic wrote:
>    
>> You gotta be kidding! Are you sure that your method is annotated with
>> @AfterClass and not @AfterTest. Is this in svn? I'd like to try it myself!
>>      
> I'm not kidding and I'm sure :)
>
> I've just committed it, r969. Do an svn updated, revert to the
> AbstractInfinispanTest.nullifyInstanceFields and run
> org.infinispan.jndi.BindingTest and you'll see an NPE being thrown in
> the preDestroy() method.
>
>    
destroyAfterClass in SingleCacheManagerTest with its dependsOnMethods 
annotation field is throwing the order off. If you remove 
dependsOnMethods field and remove preDestroy method in 
SingleCacheManagerTest everything works as expected. Try it yourself.

These dependsOnMethods annotation fields complicate things for no 
reason. If we do not use them the order of invocation of @AfterClass 
methods is always from the leaf all the way up to ancestor.




More information about the infinispan-dev mailing list