[
https://issues.apache.org/jira/browse/SLING-10919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17443770#comment-17443770
]
Stefan Seifert commented on SLING-10919:
----------------------------------------
ideally, this should be done in this method in MockServiceRegistration where we
already set some framework-controlled properties:
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/blob/f0a2d9aeebbc5a10a8aade0c69a65bcf0f23e3bc/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java#L75-L86
> OSGi Mock: Add properties "component.name" and "component.id" for registered
> DS components
> ------------------------------------------------------------------------------------------
>
> Key: SLING-10919
> URL: https://issues.apache.org/jira/browse/SLING-10919
> Project: Sling
> Issue Type: Improvement
> Components: Testing
> Affects Versions: Testing OSGi Mock 3.1.4
> Reporter: Konrad Windszus
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The method {{OsgiContextImpl.registerInjectActivateService(...)}} is used for
> testing declarative services. According to OSGi Spec all services registered
> by DS have the mandatory properties "component.name" and "component.id"
> (http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-component.properties).
> Currently {{OsgiContextImpl}} does not add those mandatory properties so
> filtering for e.g. {{component.name}} will never succeed.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)