[infinispan-dev] Creating cache managers in your unit tests
Vladimir Blagojevic
vblagoje at redhat.com
Sat Jan 2 14:16:00 EST 2010
Sanne, we can use probe utility from JGroups to ping if there are any
remaining jgroups members alive ( and therefore CacheManagers). We can
do this verification from @afterClass in superclass of all test classes.
We just have to somehow record which ports were used by particular
TestNG running thread. I will look into this problem as well. We have to
do verification somehow automatically, anything else is a futile
nightmare....
On 09-12-29 8:43 PM, Sanne Grinovero wrote:
> I've found that still some tests are not properly killing the
> CacheManager, making other random tests fail,
> so I wrote an extension to Infinispan's TestNG listener to identify
> the guilty implementations.
>
> I opened ISPN-323 to track this.
>
> To identify a non-cleaning test the testNG listener will create a new
> CacheManager and verify the number of members,
> so this is slowing down tests; to not annoy you it's only enabled in a
> new profile "debug-tests":
>
> mvn -Pdebug-tests clean test
>
> Also keep in mind that, being a listener, it can't make the test fail:
> to find the tests you'll have to grep the build output
> for "CacheManagers alive after test!".
>
> We still need to fix the identified tests, I'll create subtasks of
> ISPN-323 for that.
>
> Cheers,
> Sanne
>
>
More information about the infinispan-dev
mailing list