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

Konrad Windszus edited comment on SLING-5770 at 6/10/16 1:46 PM:
-----------------------------------------------------------------

For that I need to implement my own custom context, I would rather prefer to do 
that in the setup of the test class itself. Have a look also at the related 
ticket https://wcm-io.atlassian.net/browse/WTES-18

Also I am still not sure this can work, because the 
{{ResourceResolverFactoryActivator}} is always registered as a service in 
https://github.com/apache/sling/blob/c9e59667d8f9cd698bc33a51f3e6a22e85d4a952/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverFactoryInitializer.java#L128
 with a different configuration (no matter which configuration is otherwise 
already present in the system).


was (Author: kwin):
For that I need to implement my own custom context, I would rather prefer to do 
that in the setup of the test class itself.

Regarding properties to merge: Indeed I only want to merge with the default 
properties, so just setting the properties I want to change for the 
ConfigurationAdmin should be fine then (in my case only 
"resource.resolver.mapping").

> Allow to configure resource resolver mapping
> --------------------------------------------
>
>                 Key: SLING-5770
>                 URL: https://issues.apache.org/jira/browse/SLING-5770
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>    Affects Versions: Testing Sling Mock 1.6.2
>            Reporter: Konrad Windszus
>
> Currently the {{ResourceResolverFactoryActivator}} being registered in 
> https://github.com/apache/sling/blob/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverFactoryInitializer.java#L123
>  is not configured at all.
> Since resource resolver mapping is a topic which is often implemented in the 
> wrong way, it should be possible to setup some mapping for SlingContext to 
> allow to test in a more realistic way.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to