[infinispan-dev] to stop swallowing exceptions in testsuite?

Sanne Grinovero sanne at infinispan.org
Thu Aug 15 08:19:40 EDT 2013


Some of these warnings - which where ignored so far - are pointing out
to badly written tests which are leaking resources.
In particular if the Query engine isn't closed appropriately, file
handles to index segments are not cleared up, and these are at the
core of some of the intermittent failures we've recently seen cropping
up in the Query module.

I can't blame the test contributors having forgot some #close()
methods; for sure the intention of
TestingUtil.killCacheManagers(cacheManagers) - to make sure we
properly cleanup - is not fulfilled this way: to the contrary it
caused leaks to stay unnoticed.
Tests should really fail eagerly rather than silently continue.


On 14 August 2013 23:39, Sanne Grinovero <sanne at infinispan.org> wrote:
> It took me quite some time to figure out about a resource leak in the
> Query testsuite.
>
> The Search Engine properly warns about unclosed resources, but the
> automated test "cleanup" phase of the Infinispan testing framework
> swallows and ignores any exception happening during a
> CacheManager#close.
>
> I realize there is a need for a "safe" cleanup but ignoring exceptions
> is very tricky, could we change that to have the test fail at least?
>
> Cheers,
> Sanne


More information about the infinispan-dev mailing list