You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Sedding (JIRA)" <ji...@apache.org> on 2015/06/29 20:13:06 UTC

[jira] [Resolved] (SLING-4845) MockBundleContext is not thread-safe

     [ https://issues.apache.org/jira/browse/SLING-4845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Sedding resolved SLING-4845.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: Testing OSGi Mock 1.4.0

Fixed in https://svn.apache.org/r1688279

> MockBundleContext is not thread-safe
> ------------------------------------
>
>                 Key: SLING-4845
>                 URL: https://issues.apache.org/jira/browse/SLING-4845
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>    Affects Versions: Testing OSGi Mock 1.3.0
>            Reporter: Julian Sedding
>            Assignee: Julian Sedding
>            Priority: Minor
>             Fix For: Testing OSGi Mock 1.4.0
>
>
> According to its javdocs {{BundleContext}} must be thread-safe, the MockBundleContext implementation is not.
> Seen on jenkins build #1274: https://builds.apache.org/job/sling-trunk-1.8/1274/
> {noformat}
> java.util.ConcurrentModificationException: null
> 	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
> 	at java.util.HashMap$EntryIterator.next(HashMap.java:1463)
> 	at java.util.HashMap$EntryIterator.next(HashMap.java:1461)
> 	at org.apache.sling.testing.mock.osgi.MockBundleContext.notifyServiceListeners(MockBundleContext.java:235)
> 	at org.apache.sling.testing.mock.osgi.MockBundleContext.registerService(MockBundleContext.java:100)
> 	at org.apache.sling.testing.mock.osgi.MockBundleContext.registerService(MockBundleContext.java:85)
> 	at org.apache.sling.testing.mock.osgi.context.OsgiContextImpl.registerService(OsgiContextImpl.java:117)
> 	at org.apache.sling.testing.mock.osgi.context.OsgiContextImpl.registerService(OsgiContextImpl.java:101)
> 	at org.apache.sling.jcr.contentloader.internal.BundleContentLoaderTest.prepareContentLoader(BundleContentLoaderTest.java:69)
> {noformat}



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