You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "David Gonzalez (Jira)" <ji...@apache.org> on 2020/02/23 16:57:00 UTC
[jira] [Commented] (SLING-9131) OSGi Mock 2.4.14 breaks getting
services by highest rank
[ https://issues.apache.org/jira/browse/SLING-9131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17042991#comment-17042991 ]
David Gonzalez commented on SLING-9131:
---------------------------------------
[~sseifert] not sure if you have ideas on this as well.
> OSGi Mock 2.4.14 breaks getting services by highest rank
> --------------------------------------------------------
>
> Key: SLING-9131
> URL: https://issues.apache.org/jira/browse/SLING-9131
> Project: Sling
> Issue Type: Bug
> Components: Tooling
> Affects Versions: Testing OSGi Mock 2.4.14
> Reporter: David Gonzalez
> Priority: Major
>
> This is in regard to dependency:
> {code:java}
> <dependency>
> <groupId>org.apache.sling</groupId>
> <artifactId>org.apache.sling.testing.osgi-mock.junit4</artifactId>
> <!-- Bumping this to 2.4.14 changes behavior in how mock context resolves ranked service, which breaks ComputedPropertiesTest -->
> <version>2.4.10</version>
> <scope>test</scope>
> </dependency>{code}
> In v2.4.14 of OSGi mock, in Junit4 tests, ctx.getService(...) does not return the service w/ the highest service ranking if multiple are registered.
> This used to work in v2.4.10.
> A working test that broke when moving to 2.4.14 is available at: [https://github.com/davidjgonzalez/asset-share-commons/blob/497/unit-tests-not-executing/core/src/test/java/com/adobe/aem/commons/assetshare/content/properties/impl/ComputedPropertiesImplTest.java#L38-L56]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)