You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2021/11/16 15:05:00 UTC

[jira] [Assigned] (SLING-10922) OSGi Mock: MockBundleService.registerService() must neither consider component/metatype resources nor CA

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

Konrad Windszus reassigned SLING-10922:
---------------------------------------

    Assignee: Konrad Windszus

> OSGi Mock: MockBundleService.registerService() must neither consider component/metatype resources nor CA
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-10922
>                 URL: https://issues.apache.org/jira/browse/SLING-10922
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>    Affects Versions: Testing OSGi Mock 3.1.4
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> Currently {{MockBundleContext.registerService()}} (https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/blob/7645d720de9e27f4d9878d2e3b33d63e87da81bf/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java#L125) considers meta data of the [Metatype|http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.metatype.html#i1504250] and [DS Spec|http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html] as well as evaluates configuration provides by [Configuration Admin|http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.cm.html].
> As {{BundleContext.registerService()}} is defined by the [OSGi Core Spec|http://docs.osgi.org/specification/osgi.core/7.0.0/framework.service.html#framework.service.registeringservices] it does not have any relation to the other OSGi Compendium specs and therefore must not consider OSGi metadata nor OSGi config admin.
> On the other hand {{OsgiContextImpl.registerInjectActivateService()}} should always register for all service interfaces being define in the DS component metadata in https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/blob/7645d720de9e27f4d9878d2e3b33d63e87da81bf/core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java#L155 and https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/blob/7645d720de9e27f4d9878d2e3b33d63e87da81bf/core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java#L192



--
This message was sent by Atlassian Jira
(v8.20.1#820001)