[ 
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:40 PM:
---------------------------------------------------------------

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

the ResourceResolverFactory is registered by ResourceResolverFactoryActivator, 
and since one 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.

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


was (Author: [email protected]):
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. 

> 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)

Reply via email to