You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2017/05/08 13:40:04 UTC

[jira] [Comment Edited] (SLING-6841) Sling Mocks should inject ResourceResolverFactory by default

    [ https://issues.apache.org/jira/browse/SLING-6841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000741#comment-16000741 ] 

Stefan Seifert edited comment on SLING-6841 at 5/8/17 1:39 PM:
---------------------------------------------------------------

the behavior has changed here in last sling mock release - SLING-6812

the ResourceResolverFactory is registered by ResourceResolverFactoryActivator, and since on of the latest versions of resourceresolver this is only done when any resource provider is found.

to test custom resource providers sling-mock also provides a "NONE" mode for ResourceResolver type - and this failed when registering the ResourceResolverFactory via the activator for each unit test automatically.

why might change the behavior from SLING-6812 to do this lazy initialization only when ResourceReolverType = NONE. 


was (Author: sseifert@pro-vision.de):
the behavior has changed here in last sling mock release - SLING-6812

the ResourceResolverFactory is registered by ResourceResolverFactoryActivator, and since the latest version of resourceresolver this is only done when any resource provider is found.

to test custom resource providers sling-mock also provides a "NONE" mode for ResourceResolver type - and this failed when registering the ResourceResolverFactory via the activator for each unit test automatically.

why might change the behavior from SLING-6812 to do this lazy initialization only when ResourceReolverType = NONE. 

> Sling Mocks should inject ResourceResolverFactory by default
> ------------------------------------------------------------
>
>                 Key: SLING-6841
>                 URL: https://issues.apache.org/jira/browse/SLING-6841
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Justin Edelson
>             Fix For: Testing Sling Mock 2.2.8
>
>
> SlingContextImpl doesn't register a ResourceResolverFactory by default. This should be one of the default services.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)