[ 
https://issues.apache.org/jira/browse/SLING-5088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941352#comment-14941352
 ] 

Stefan Seifert commented on SLING-5088:
---------------------------------------

examples for threads that pile up after surefire run of sling-mock:
{noformat}
  Thread "Apache Sling JCR Resource Event Queue Processor for path '/'":
    at sun.misc.Unsafe.park(boolean, long)
    at java.util.concurrent.locks.LockSupport.park(java.lang.Object)
    at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await()
    at java.util.concurrent.LinkedBlockingQueue.take()
    at 
org.apache.sling.jcr.resource.internal.JcrResourceListener.processOsgiEventQueue()
    at org.apache.sling.jcr.resource.internal.JcrResourceListener$1.run()
    at java.lang.Thread.run()
{noformat}
{noformat}
  Thread "MapEntries Update":
    at sun.misc.Unsafe.park(boolean, long)
    at java.util.concurrent.locks.LockSupport.park(java.lang.Object)
    at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt()
    at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int)
    at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int)
    at java.util.concurrent.Semaphore.acquire()
    at org.apache.sling.resourceresolver.impl.mapping.MapEntries.init()
    at 
org.apache.sling.resourceresolver.impl.mapping.MapEntries.access$000(org.apache.sling.resourceresolver.impl.mapping.MapEntries)
    at org.apache.sling.resourceresolver.impl.mapping.MapEntries$1.run()
    at java.lang.Thread.run()
{noformat}
{noformat}
  Thread "pool-12-thread-1":
    at sun.misc.Unsafe.park(boolean, long)
    at java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long)
    at 
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(java.util.concurrent.SynchronousQueue$TransferStack$SNode,
 boolean, long)
    at 
java.util.concurrent.SynchronousQueue$TransferStack.transfer(java.lang.Object, 
boolean, long)
    at java.util.concurrent.SynchronousQueue.poll(long, 
java.util.concurrent.TimeUnit)
    at java.util.concurrent.ThreadPoolExecutor.getTask()
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run()
    at java.lang.Thread.run()
{noformat}

> sling-mock: Threads created by resource resolver/JCR are not terminated 
> properly
> --------------------------------------------------------------------------------
>
>                 Key: SLING-5088
>                 URL: https://issues.apache.org/jira/browse/SLING-5088
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>    Affects Versions: Testing Sling Mock 1.5.0
>            Reporter: Stefan Seifert
>            Assignee: Stefan Seifert
>            Priority: Critical
>              Labels: mocks
>             Fix For: Testing Sling Mock 1.6.0
>
>
> as detected in SLING-5067 threads that are opened during unit test run when 
> setting up resource resolver with JCR mapping for the mocks are not 
> terminated properly and may lead to problems if the number of unit tests 
> increases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to