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:10:04 UTC

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

Julian Sedding created SLING-4845:
-------------------------------------

             Summary: 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


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)