]
Ryan Emerson resolved ISPN-10880.
---------------------------------
Resolution: Done
JCacheConfigurationTest leaks cache manager
-------------------------------------------
Key: ISPN-10880
URL:
https://issues.jboss.org/browse/ISPN-10880
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Core
Affects Versions: 10.0.0.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Labels: testsuite_stability
Fix For: 10.1.0.Beta1
{noformat}
ThreadLeakCheckerorg.infinispan.commons.test.ThreadLeakChecker$LeakException: Leaked
thread: expiration-thread--p446-t1 << testng-JCacheConfigurationTest <<
org.infinispan.jcache.JCacheConfigurationTest
...
Caused by: org.infinispan.commons.test.ThreadLeakChecker$LeakException:
testng-JCacheConfigurationTest << org.infinispan.jcache.JCacheConfigurationTest
at
org.infinispan.commons.test.ThreadLeakChecker$ThreadInfoLocal.childValue(ThreadLeakChecker.java:107)
...
at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:713)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:391)
at org.infinispan.jcache.embedded.JCacheManager.<init>(JCacheManager.java:75)
at
org.infinispan.jcache.JCacheConfigurationTest.lambda$testJCacheManagerWithRealJarFileSchema$1(JCacheConfigurationTest.java:107)
at
org.infinispan.jcache.util.JCacheTestingUtil.withCachingProvider(JCacheTestingUtil.java:36)
at
org.infinispan.jcache.JCacheConfigurationTest.testJCacheManagerWithRealJarFileSchema(JCacheConfigurationTest.java:104)
{noformat}
The leak is only reported some of the time because {{AbstractJCacheManager}} has a
{{finalize()}} method and stops the underlying cache manager.
The threads created by {{DefaultCacheManager}} ensure it's still referenced during
finalization, allowing it to stop cleanly.