[
https://issues.apache.org/jira/browse/SLING-9131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17043399#comment-17043399
]
Stefan Seifert commented on SLING-9131:
---------------------------------------
the biggest change in 2.4.0 was the upate of a bunch of dependencies to a newer
version (still "from 2017" to keep some backwards compatibility)
https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/53b029af8ddc25e51a7feff61568ebf350d613b4
maybe there is a conflict with those deps and you have explicitly defined a
dependency to one of those bundles to an older/incompatible version.
> 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)