-
Bug
-
Resolution: Done
-
Major
-
12.0.0.Final
-
None
ThreadLocalLeakTest is supposed to invoke a cache operation on a new thread and keep that new thread running, then check that the operation didn't leave any thread locals on that thread. But sometimes the cache manager is stopped before the new thread managed to invoke the cache operation, causing a IllegalLifecycleStateException that is never caught:
org.infinispan.commons.IllegalLifecycleStateException: Cache container has been stopped and cannot be reused. Recreate the cache container. at org.infinispan.manager.DefaultCacheManager.assertIsNotTerminated(DefaultCacheManager.java:1074) at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:517) at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:510) at org.infinispan.util.ThreadLocalLeakTest.lambda$doStuffWithCache$1(ThreadLocalLeakTest.java:103) at org.infinispan.test.AbstractInfinispanTest$RunnableWrapper.run(AbstractInfinispanTest.java:507)
org.infinispan.commons.IllegalLifecycleStateException: ISPN000324: Cache 'leak' is in 'STOPPING' state and this is an invocation not belonging to an on-going transaction, so it does not accept new invocations. Either restart it or recreate the cache container. at org.infinispan.interceptors.impl.InvocationContextInterceptor.ignoreCommand(InvocationContextInterceptor.java:100) at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:86) at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:244) at org.infinispan.cache.impl.InvocationHelper.doInvoke(InvocationHelper.java:297) at org.infinispan.cache.impl.InvocationHelper.invoke(InvocationHelper.java:101) at org.infinispan.cache.impl.InvocationHelper.invoke(InvocationHelper.java:83) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1292) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1820) at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:225) at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:449) at org.infinispan.cache.impl.EncoderCache.put(EncoderCache.java:715) at org.infinispan.util.ThreadLocalLeakTest.lambda$doStuffWithCache$1(ThreadLocalLeakTest.java:104) at org.infinispan.test.AbstractInfinispanTest$RunnableWrapper.run(AbstractInfinispanTest.java:507)