[jira] [Comment Edited] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Eric Norman (Jira)


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

Eric Norman edited comment on SLING-10938 at 11/27/21, 1:15 AM:


FYI: I also saw this error (and other similar ones) in the context of 
SLING-10143

If I recall correctly, that error during shutdown was somehow related to (or 
aggravated by) upgrading to org.osgi:org.osgi.service.log:1.5.0.   I didn't 
look into the details or reason, I just switched back to the 1.4.0 version for 
my project.  Maybe that error has always been happening, but it just wasn't 
logged before due to something that was changed in the 1.5.0 version?  Or 
perhaps the timing is just different with a different set of bundles. Updating 
to org.osgi:org.osgi.service.log:1.5.0 (or downgrading to 
org.osgi:org.osgi.service.log:1.4.0) may help reproduce what is different for 
anyone attempting to debug the problem.


was (Author: enorman):
FYI: I also saw this error (and other similar ones) in the context of 
SLING-10143

If I recall correctly, that error during shutdown was somehow related to (or 
aggravated by) upgrading to org.osgi:org.osgi.service.log:1.5.0.   I didn't 
look into the details or reason, I just switched back to the 1.4.0 version for 
my project.  Maybe that error has always been happening, but it just wasn't 
logged before due to something that was changed in the 1.5.0 version?  Or 
perhaps the timing is just different with a different set of bundles, but 
updating to org.osgi:org.osgi.service.log:1.5.0 may help reproduce the error 
for anyone attempting to debug the problem.

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt, stdout.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-10938:
-

FYI: I also saw this error (and other similar ones) in the context of 
SLING-10143

If I recall correctly, that error during shutdown was somehow related to (or 
aggravated by) upgrading to org.osgi:org.osgi.service.log:1.5.0.   I didn't 
look into the details or reason, I just switched back to the 1.4.0 version for 
my project.  Maybe that error has always been happening, but it just wasn't 
logged before due to something that was changed in the 1.5.0 version?  Or 
perhaps the timing is just different with a different set of bundles, but 
updating to org.osgi:org.osgi.service.log:1.5.0 may help reproduce the error 
for anyone attempting to debug the problem.

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt, stdout.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Karl Pauls (Jira)


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

Karl Pauls commented on SLING-10938:


Can't see the service user mapper involved in these, no?

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt, stdout.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Jira


 [ 
https://issues.apache.org/jira/browse/SLING-10938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Goliński updated SLING-10938:

Attachment: stdout.txt

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt, stdout.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Jira


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

Michał Goliński commented on SLING-10938:
-

I've attached an error.log of a run starting with a clean slate, that ended 
with a single exception. Also a stdout for reference. [~rombert] I'll try to 
investigate what is the cause here.

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Jira


 [ 
https://issues.apache.org/jira/browse/SLING-10938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Goliński updated SLING-10938:

Attachment: error.log

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Jira


 [ 
https://issues.apache.org/jira/browse/SLING-10938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Goliński updated SLING-10938:

Attachment: (was: error.log)

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: stacktrace.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Jira


 [ 
https://issues.apache.org/jira/browse/SLING-10938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Goliński updated SLING-10938:

Attachment: error.log

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: error.log, stacktrace.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Resolved] (SLING-10944) sling-mock: Tear down MockSlingBindings on context tear down

2021-11-26 Thread Stefan Seifert (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-10944.

Resolution: Fixed

https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/a223de695f7ce3b55e51767ac58874a0fac08adf

> sling-mock: Tear down MockSlingBindings on context tear down
> 
>
> Key: SLING-10944
> URL: https://issues.apache.org/jira/browse/SLING-10944
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Testing Sling Mock 3.1.4
>
>
> MockSlingBindings is integrated in a complex fashion:
> * it's created together with a mock sling http serlvet request (stored as 
> request attributes)
> * it holds a reference to the current context to get access to all context 
> objects (e.g. current resource) which may change during test execution
> * additionally it listens to OSGi events for registering or unregistering 
> BindingsValuesProvider instances and allows to get values from them as value
> the asynchronous handling of registering/unregistering events and accessing 
> the context may lead to conflicts if the context is in process of shutting 
> down, or already was shut down and an event reaches the instance later in 
> time (OSGi events are processed asynchronously). esp. i may happen that other 
> services which are deactivated are sending such events late in the chain of 
> deactivations.
> such a racing condition seems to be the root case of the problems described 
> in [WTES-69|https://wcm-io.atlassian.net/browse/WTES-69].



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Resolved] (SLING-10943) sling-mock: Remove support for event admin events

2021-11-26 Thread Stefan Seifert (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-10943.

Resolution: Fixed

https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/1f99c6119209ed2e93ffc4ae224becd03ccbee54

> sling-mock: Remove support for event admin events
> -
>
> Key: SLING-10943
> URL: https://issues.apache.org/jira/browse/SLING-10943
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
> Fix For: Testing Sling Mock 3.1.4
>
>
> in line with the real adapter implementation (SLING-10898) we should remove 
> the support for sending events for adapter factory registrations from the 
> mock implementation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (SLING-10944) sling-mock: Tear down MockSlingBindings on context tear down

2021-11-26 Thread Stefan Seifert (Jira)
Stefan Seifert created SLING-10944:
--

 Summary: sling-mock: Tear down MockSlingBindings on context tear 
down
 Key: SLING-10944
 URL: https://issues.apache.org/jira/browse/SLING-10944
 Project: Sling
  Issue Type: Bug
  Components: Testing
Reporter: Stefan Seifert
Assignee: Stefan Seifert
 Fix For: Testing Sling Mock 3.1.4


MockSlingBindings is integrated in a complex fashion:
* it's created together with a mock sling http serlvet request (stored as 
request attributes)
* it holds a reference to the current context to get access to all context 
objects (e.g. current resource) which may change during test execution
* additionally it listens to OSGi events for registering or unregistering 
BindingsValuesProvider instances and allows to get values from them as value

the asynchronous handling of registering/unregistering events and accessing the 
context may lead to conflicts if the context is in process of shutting down, or 
already was shut down and an event reaches the instance later in time (OSGi 
events are processed asynchronously). esp. i may happen that other services 
which are deactivated are sending such events late in the chain of 
deactivations.

such a racing condition seems to be the root case of the problems described in 
[WTES-69|https://wcm-io.atlassian.net/browse/WTES-69].



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-10943) sling-mock: Remove support for event admin events

2021-11-26 Thread Stefan Seifert (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert updated SLING-10943:
---
Fix Version/s: Testing Sling Mock 3.1.4
   (was: Testing OSGi Mock 3.1.6)

> sling-mock: Remove support for event admin events
> -
>
> Key: SLING-10943
> URL: https://issues.apache.org/jira/browse/SLING-10943
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
> Fix For: Testing Sling Mock 3.1.4
>
>
> in line with the real adapter implementation (SLING-10898) we should remove 
> the support for sending events for adapter factory registrations from the 
> mock implementation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (SLING-10943) sling-mock: Remove support for event admin events

2021-11-26 Thread Stefan Seifert (Jira)
Stefan Seifert created SLING-10943:
--

 Summary: sling-mock: Remove support for event admin events
 Key: SLING-10943
 URL: https://issues.apache.org/jira/browse/SLING-10943
 Project: Sling
  Issue Type: Improvement
  Components: Testing
Reporter: Stefan Seifert
Assignee: Stefan Seifert
 Fix For: Testing OSGi Mock 3.1.6


in line with the real adapter implementation (SLING-10898) we should remove the 
support for sending events for adapter factory registrations from the mock 
implementation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[GitHub] [sling-org-apache-sling-testing-sling-mock-oak] sonarcloud[bot] commented on pull request #4: SLING-10942 update to Oak 1.40

2021-11-26 Thread GitBox


sonarcloud[bot] commented on pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/pull/4#issuecomment-980147780


   Kudos, SonarCloud Quality Gate passed!  ![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate passed')
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=coverage=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock-oak=4=duplicated_lines_density=list)
 No Duplication information
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[RESULT] [VOTE] Release Apache Sling Testing Clients version 2.0.12

2021-11-26 Thread Andrei Dulvac
Hi, The vote has passed with the following result : +1 (binding): Robert,
Stefan, Nicolas +1 (non binding): none I will copy this release to the
Sling dist directory and promote the artifacts to the central Maven
repository.

Cheers,
- Andrei


[GitHub] [sling-org-apache-sling-testing-sling-mock-oak] kwin commented on a change in pull request #4: SLING-10942 update to Oak 1.40

2021-11-26 Thread GitBox


kwin commented on a change in pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/pull/4#discussion_r757623805



##
File path: pom.xml
##
@@ -180,7 +167,7 @@
 maven-shade-plugin
 
 

[GitHub] [sling-org-apache-sling-testing-sling-mock-oak] kwin commented on a change in pull request #4: SLING-10942 update to Oak 1.40

2021-11-26 Thread GitBox


kwin commented on a change in pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/pull/4#discussion_r757622647



##
File path: pom.xml
##
@@ -67,27 +67,14 @@
 org.apache.sling.testing.sling-mock.core
 ${sling-mock.version}
 provided
-
-
-org.apache.jackrabbit
-jackrabbit-api
-
-
 
 
 org.apache.sling
 org.apache.sling.testing.sling-mock.core
 ${sling-mock.version}
 tests
 test
-

Review comment:
   why were these excludes necessary?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (SLING-10942) Make Testing Sling Mock Oak compatible with Java14+

2021-11-26 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-10942:


i think that's fine - we can always produce additional artifacts with an older 
oak version if there really is a need for it.

> Make Testing Sling Mock Oak compatible with Java14+
> ---
>
> Key: SLING-10942
> URL: https://issues.apache.org/jira/browse/SLING-10942
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 3.0.0-1.16.0
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently {{org.apache.sling.testing.sling-mock-oak}} still depends on an old 
> Oak version (1.16.0) which is not compatible with Java14 or above.
> The reason is https://issues.apache.org/jira/browse/OAK-7358 and an error 
> like this can be observed in the log
> {code}
> java.lang.NoClassDefFoundError: java/security/acl/Group
>   at 
> org.apache.jackrabbit.oak.security.user.UserConfigurationImpl.getUserPrincipalProvider(UserConfigurationImpl.java:245)
>   at 
> org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl.getPrincipalProvider(PrincipalConfigurationImpl.java:75)
>   at 
> org.apache.jackrabbit.oak.spi.security.principal.CompositePrincipalConfiguration.getPrincipalProvider(CompositePrincipalConfiguration.java:55)
>   at 
> org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipalProvider(AbstractLoginModule.java:454)
>   at 
> org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:490)
>   at 
> org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl.commit(LoginModuleImpl.java:167)
>   at 
> java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:737)
>   at 
> java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:672)
>   at 
> java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:670)
>   at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
>   at 
> java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:670)
>   at 
> java.base/javax.security.auth.login.LoginContext.login(LoginContext.java:581)
>   at 
> org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login(ContentRepositoryImpl.java:163)
>   at 
> org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:288)
>   at 
> org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:226)
>   at 
> org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.login(OakMockSlingRepository.java:123)
>   at 
> org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.loginAdministrative(OakMockSlingRepository.java:139)
>   at 
> org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.registerJcrNodeTypes(ResourceResolverFactoryInitializer.java:235)
>   at 
> org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.setUp(ResourceResolverFactoryInitializer.java:69)
>   at 
> org.apache.sling.testing.mock.sling.MockSling.newResourceResolverFactory(MockSling.java:87)
>   at ...
> Caused by: java.lang.ClassNotFoundException: java.security.acl.Group
>   at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
>   at 
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
>   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
>   ... 49 more
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-10942) Make Testing Sling Mock Oak compatible with Java14+

2021-11-26 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-10942:
-

A fix requires an update to Oak 1.26 or newer. A consumer cannot overwrite the 
used Oak version as it is shaded in the Sling Mock Oak jar. As usually Oak 
releases are backwards compatible I would go for the latest stable version 
which is Oak 1.40 as of today.

> Make Testing Sling Mock Oak compatible with Java14+
> ---
>
> Key: SLING-10942
> URL: https://issues.apache.org/jira/browse/SLING-10942
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 3.0.0-1.16.0
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently {{org.apache.sling.testing.sling-mock-oak}} still depends on an old 
> Oak version (1.16.0) which is not compatible with Java14 or above.
> The reason is https://issues.apache.org/jira/browse/OAK-7358 and an error 
> like this can be observed in the log
> {code}
> java.lang.NoClassDefFoundError: java/security/acl/Group
>   at 
> org.apache.jackrabbit.oak.security.user.UserConfigurationImpl.getUserPrincipalProvider(UserConfigurationImpl.java:245)
>   at 
> org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl.getPrincipalProvider(PrincipalConfigurationImpl.java:75)
>   at 
> org.apache.jackrabbit.oak.spi.security.principal.CompositePrincipalConfiguration.getPrincipalProvider(CompositePrincipalConfiguration.java:55)
>   at 
> org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipalProvider(AbstractLoginModule.java:454)
>   at 
> org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:490)
>   at 
> org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl.commit(LoginModuleImpl.java:167)
>   at 
> java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:737)
>   at 
> java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:672)
>   at 
> java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:670)
>   at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
>   at 
> java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:670)
>   at 
> java.base/javax.security.auth.login.LoginContext.login(LoginContext.java:581)
>   at 
> org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login(ContentRepositoryImpl.java:163)
>   at 
> org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:288)
>   at 
> org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:226)
>   at 
> org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.login(OakMockSlingRepository.java:123)
>   at 
> org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.loginAdministrative(OakMockSlingRepository.java:139)
>   at 
> org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.registerJcrNodeTypes(ResourceResolverFactoryInitializer.java:235)
>   at 
> org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.setUp(ResourceResolverFactoryInitializer.java:69)
>   at 
> org.apache.sling.testing.mock.sling.MockSling.newResourceResolverFactory(MockSling.java:87)
>   at ...
> Caused by: java.lang.ClassNotFoundException: java.security.acl.Group
>   at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
>   at 
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
>   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
>   ... 49 more
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (SLING-10942) Make Testing Sling Mock Oak compatible with Java14+

2021-11-26 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-10942:
---

 Summary: Make Testing Sling Mock Oak compatible with Java14+
 Key: SLING-10942
 URL: https://issues.apache.org/jira/browse/SLING-10942
 Project: Sling
  Issue Type: Bug
  Components: Testing
Affects Versions: Testing Sling Mock Oak 3.0.0-1.16.0
Reporter: Konrad Windszus


Currently {{org.apache.sling.testing.sling-mock-oak}} still depends on an old 
Oak version (1.16.0) which is not compatible with Java14 or above.
The reason is https://issues.apache.org/jira/browse/OAK-7358 and an error like 
this can be observed in the log
{code}
java.lang.NoClassDefFoundError: java/security/acl/Group
at 
org.apache.jackrabbit.oak.security.user.UserConfigurationImpl.getUserPrincipalProvider(UserConfigurationImpl.java:245)
at 
org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl.getPrincipalProvider(PrincipalConfigurationImpl.java:75)
at 
org.apache.jackrabbit.oak.spi.security.principal.CompositePrincipalConfiguration.getPrincipalProvider(CompositePrincipalConfiguration.java:55)
at 
org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipalProvider(AbstractLoginModule.java:454)
at 
org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:490)
at 
org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl.commit(LoginModuleImpl.java:167)
at 
java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:737)
at 
java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:672)
at 
java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:670)
at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at 
java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:670)
at 
java.base/javax.security.auth.login.LoginContext.login(LoginContext.java:581)
at 
org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login(ContentRepositoryImpl.java:163)
at 
org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:288)
at 
org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:226)
at 
org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.login(OakMockSlingRepository.java:123)
at 
org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.loginAdministrative(OakMockSlingRepository.java:139)
at 
org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.registerJcrNodeTypes(ResourceResolverFactoryInitializer.java:235)
at 
org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.setUp(ResourceResolverFactoryInitializer.java:69)
at 
org.apache.sling.testing.mock.sling.MockSling.newResourceResolverFactory(MockSling.java:87)
at ...
Caused by: java.lang.ClassNotFoundException: java.security.acl.Group
at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 49 more

{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-8073:
---
Fix Version/s: Testing Sling Mock 3.1.4

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4, Testing OSGi Mock 3.1.4
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6, Testing Sling Mock 3.1.4
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>   at 
> 

[jira] [Commented] (SLING-10937) Resource in tested Sling Model not equal to Resource it was adapted from (RESOURCERESOLVER_MOCK)

2021-11-26 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-10937:
-

I agree with that proposal. I already refactored the affected test to no longer 
use the equals argument matchers for the resource. That way it still works with 
RESOURCERESOLVER_MOCK.

> Resource in tested Sling Model not equal to Resource it was adapted from 
> (RESOURCERESOLVER_MOCK)
> 
>
> Key: SLING-10937
> URL: https://issues.apache.org/jira/browse/SLING-10937
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.1.2
>Reporter: Konrad Windszus
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The resources returned from 
> {{org.apache.sling.testing.mock.sling.RRMockResourceResolverWrapper}} are of 
> type {{ResourceResolverResourceWrapper}} (in case the resource providers are 
> empty).
> When these resources are adapted to a Sling Model, the injected resource is 
> the unwrapped resource which is not equal to the wrapped resource from 
> outside.
> This is due to the fact that {{ResourceResolverResourceWrapper.adaptTo(...)}} 
> is not overwritten but just delegated to the underlying Resource. That makes 
> the Adapter only acting on the unwrapped resource which is not equal to the 
> wrapped one.
> This leads to unexpected behaviour when verifying interactions with mocks 
> taking the resource as argument, as the wrapped resource is never equal to 
> the resource used in the Sling Model given to the mock.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-8073:
---

this also required a fix in sling-mock itself, done in 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/4176be162961185bc8a08d7ef56d60c2ba8c3028

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4, Testing OSGi Mock 3.1.4
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> 

[jira] [Updated] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-8073:
---
Affects Version/s: Testing OSGi Mock 3.1.4

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4, Testing OSGi Mock 3.1.4
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>   at 
> 

[jira] [Resolved] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus resolved SLING-8073.

Resolution: Fixed

Fixed in 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/commit/48e0d1e632f13f025161507349f9bc2a1d364fd8.

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>   

[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin merged pull request #18: SLING-8073 update reflections library to 0.10.2

2021-11-26 Thread GitBox


kwin merged pull request #18:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/18


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Resolved] (SLING-10940) osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread Stefan Seifert (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert resolved SLING-10940.

Resolution: Fixed

> osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)
> ---
>
> Key: SLING-10940
> URL: https://issues.apache.org/jira/browse/SLING-10940
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> currently, only {{getConfiguration(pid)}} is implemented.
> we should also implement {{getConfiguration(pid, location)}}, internally 
> relying to {{getConfiguration(pid)}} (we do nothing wit the location in the 
> mocks)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Resolved] (SLING-10941) Allow setting environment variables for launches

2021-11-26 Thread Robert Munteanu (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu resolved SLING-10941.
-
Resolution: Fixed

Fixed in https://github.com/apache/sling-feature-launcher-maven-plugin/pull/3

> Allow setting environment variables for launches
> 
>
> Key: SLING-10941
> URL: https://issues.apache.org/jira/browse/SLING-10941
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model, Maven Plugins and Archetypes
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Feature Launcher Maven Plugin 0.1.2
>
>
> When a feature model based application makes use of environment variables for 
> configuration, for instance using the [Felix ConfigAdmin interpolation 
> plugin|https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation],
>  it is useful to be able to configure environment variables per launch.
> Without this feature all env vars would be inherited from the launching 
> process.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[GitHub] [sling-org-apache-sling-testing-osgi-mock] stefanseifert merged pull request #17: SLING-10940 osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread GitBox


stefanseifert merged pull request #17:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] sonarcloud[bot] removed a comment on pull request #17: SLING-10940 osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread GitBox


sonarcloud[bot] removed a comment on pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17#issuecomment-980043495


   Kudos, SonarCloud Quality Gate passed!  ![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate passed')
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] sonarcloud[bot] commented on pull request #17: SLING-10940 osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread GitBox


sonarcloud[bot] commented on pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17#issuecomment-980055014


   Kudos, SonarCloud Quality Gate passed!  ![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate passed')
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin commented on a change in pull request #18: SLING-8073 update reflections library to 0.10.2

2021-11-26 Thread GitBox


kwin commented on a change in pull request #18:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/18#discussion_r757578783



##
File path: core/pom.xml
##
@@ -114,6 +110,10 @@
 org.slf4j
 slf4j-simple
 
+

Review comment:
   good point, exclusion added in 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/18/commits/2912b732457c5b0546668c618774d5cd9cfbbdeb.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] stefanseifert commented on pull request #17: SLING-10940 osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread GitBox


stefanseifert commented on pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17#issuecomment-980053361


   rebase done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Created] (SLING-10941) Allow setting environment variables for launches

2021-11-26 Thread Robert Munteanu (Jira)
Robert Munteanu created SLING-10941:
---

 Summary: Allow setting environment variables for launches
 Key: SLING-10941
 URL: https://issues.apache.org/jira/browse/SLING-10941
 Project: Sling
  Issue Type: New Feature
  Components: Feature Model, Maven Plugins and Archetypes
Reporter: Robert Munteanu
Assignee: Robert Munteanu
 Fix For: Feature Launcher Maven Plugin 0.1.2


When a feature model based application makes use of environment variables for 
configuration, for instance using the [Felix ConfigAdmin interpolation 
plugin|https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation],
 it is useful to be able to configure environment variables per launch.

Without this feature all env vars would be inherited from the launching process.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[GitHub] [sling-org-apache-sling-testing-osgi-mock] stefanseifert commented on a change in pull request #18: SLING-8073 update reflections library to 0.10.2

2021-11-26 Thread GitBox


stefanseifert commented on a change in pull request #18:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/18#discussion_r757571940



##
File path: core/pom.xml
##
@@ -114,6 +110,10 @@
 org.slf4j
 slf4j-simple
 
+

Review comment:
   it think we should also exclude compile dependency to 
com.google.code.findbugs:jsr305:jar:3.0.2:compile?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] sonarcloud[bot] commented on pull request #18: SLING-8073 update reflections library to 0.10.2

2021-11-26 Thread GitBox


sonarcloud[bot] commented on pull request #18:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/18#issuecomment-980046444


   Kudos, SonarCloud Quality Gate passed!  ![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate passed')
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=18=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=18=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=18=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=18=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=18=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin commented on pull request #17: SLING-10940 osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread GitBox


kwin commented on pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17#issuecomment-980046398


   LGTM, but can you rebase and also adjust my just merged test from 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/commit/7be9cca77ae227081b2b15959b374a6eb334e5c8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-8073:
---
Fix Version/s: Testing OSGi Mock 3.1.6

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
>   at 
> 

[jira] [Resolved] (SLING-10498) MockConfiguration#delete() does not delete the configuration (still found by ConfigurationAdmin)

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus resolved SLING-10498.
-
Resolution: Fixed

Fixed in 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/commit/7be9cca77ae227081b2b15959b374a6eb334e5c8.

> MockConfiguration#delete() does not delete the configuration (still found by 
> ConfigurationAdmin)
> 
>
> Key: SLING-10498
> URL: https://issues.apache.org/jira/browse/SLING-10498
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing OSGi Mock 3.1.2
>Reporter: Henry Kuijpers
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> MockConfiguration#delete does not delete the configuration from the map (in 
> MockConfigurationAdmin), but instead clears the properties of the 
> configuration (while maintaining the PID).
> To mimic a real world scenario, that configuration should in fact be deleted 
> from the map that MockConfigurationAdmin is holding.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin merged pull request #16: SLING-10498 fix Configuration.delete() behavior

2021-11-26 Thread GitBox


kwin merged pull request #16:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/16


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin opened a new pull request #18: SLING-8073 update reflections library to 0.10.2

2021-11-26 Thread GitBox


kwin opened a new pull request #18:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/18


   improves logging and exception handling


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] sonarcloud[bot] commented on pull request #17: SLING-10940 osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread GitBox


sonarcloud[bot] commented on pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17#issuecomment-980043495


   Kudos, SonarCloud Quality Gate passed!  ![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate passed')
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=17=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=17=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (SLING-10940) osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-10940:


PR: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/17

> osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)
> ---
>
> Key: SLING-10940
> URL: https://issues.apache.org/jira/browse/SLING-10940
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Minor
> Fix For: Testing OSGi Mock 3.1.6
>
>
> currently, only {{getConfiguration(pid)}} is implemented.
> we should also implement {{getConfiguration(pid, location)}}, internally 
> relying to {{getConfiguration(pid)}} (we do nothing wit the location in the 
> mocks)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Created] (SLING-10940) osgi-mock: Implement MockConfigurationAdmin.getConfiguration(pid, location)

2021-11-26 Thread Stefan Seifert (Jira)
Stefan Seifert created SLING-10940:
--

 Summary: osgi-mock: Implement 
MockConfigurationAdmin.getConfiguration(pid, location)
 Key: SLING-10940
 URL: https://issues.apache.org/jira/browse/SLING-10940
 Project: Sling
  Issue Type: Improvement
  Components: Testing
Reporter: Stefan Seifert
Assignee: Stefan Seifert
 Fix For: Testing OSGi Mock 3.1.6


currently, only {{getConfiguration(pid)}} is implemented.

we should also implement {{getConfiguration(pid, location)}}, internally 
relying to {{getConfiguration(pid)}} (we do nothing wit the location in the 
mocks)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-8073:


It seems that refactoring of the reflections library done for version 0.10.x 
improved the situation a lot. Let us try to upgrade to the newest version now.

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)

[jira] [Assigned] (SLING-8073) Sling Mock: Make classloading issues with ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-8073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus reassigned SLING-8073:
--

Assignee: Konrad Windszus

> Sling Mock: Make classloading issues with 
> ModelAdapterFactoryUtil.getModelClassUrlsForPackage easier to debug
> -
>
> Key: SLING-8073
> URL: https://issues.apache.org/jira/browse/SLING-8073
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.3.4
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> Currently if you have some class loading issue in a used model, you get the 
> following kind of exception
> {code}
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s 
> <<< FAILURE! - in 
> [ERROR]   Time elapsed: 0 s  <<< ERROR!
> org.reflections.ReflectionsException: could not get type for name  Model>
>   at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:389)
>   at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:398)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:385)
>   at 
> org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.getModelClassUrlsForPackages(ModelAdapterFactoryUtil.java:147)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.access$000(ModelAdapterFactoryUtil.java:54)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil$RegisterModelsBundle.findEntries(ModelAdapterFactoryUtil.java:231)
>   at 
> org.apache.sling.models.impl.ModelPackageBundleListener.addingBundle(ModelPackageBundleListener.java:86)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
>   at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>   at 
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
>   at 
> org.apache.sling.testing.mock.osgi.MockBundleContext.sendBundleEvent(MockBundleContext.java:372)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.sendBundleEvent(MockOsgi.java:60)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForPackages(ModelAdapterFactoryUtil.java:91)
>   at 
> org.apache.sling.testing.mock.sling.context.ModelAdapterFactoryUtil.addModelsForManifestEntries(ModelAdapterFactoryUtil.java:124)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.registerDefaultServices(SlingContextImpl.java:168)
>   at 
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:117)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext.access$100(SlingContext.java:40)
>   at 
> org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:127)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>   at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
>   at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
>   at 
> 

[jira] [Updated] (SLING-10498) MockConfiguration#delete() does not delete the configuration (still found by ConfigurationAdmin)

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-10498:

Fix Version/s: Testing OSGi Mock 3.1.6

> MockConfiguration#delete() does not delete the configuration (still found by 
> ConfigurationAdmin)
> 
>
> Key: SLING-10498
> URL: https://issues.apache.org/jira/browse/SLING-10498
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing OSGi Mock 3.1.2
>Reporter: Henry Kuijpers
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing OSGi Mock 3.1.6
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> MockConfiguration#delete does not delete the configuration from the map (in 
> MockConfigurationAdmin), but instead clears the properties of the 
> configuration (while maintaining the PID).
> To mimic a real world scenario, that configuration should in fact be deleted 
> from the map that MockConfigurationAdmin is holding.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[GitHub] [sling-org-apache-sling-testing-osgi-mock] sonarcloud[bot] commented on pull request #16: SLING-10498 fix Configuration.delete() behavior

2021-11-26 Thread GitBox


sonarcloud[bot] commented on pull request #16:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/16#issuecomment-980012607


   SonarCloud Quality Gate failed.  ![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate failed')
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=CODE_SMELL)
 [11 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=16=false=CODE_SMELL)
   
   
[![51.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50-16px.png
 
'51.6%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=16=new_coverage=list)
 [51.6% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=16=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=16=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=16=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin closed pull request #13: SLING-10930 don't automatically call deactivate method

2021-11-26 Thread GitBox


kwin closed pull request #13:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/13


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin commented on pull request #13: SLING-10930 don't automatically call deactivate method

2021-11-26 Thread GitBox


kwin commented on pull request #13:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/13#issuecomment-980010627


   Superseded by #14 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-testing-osgi-mock] kwin opened a new pull request #16: SLING-10498 fix Configuration.delete() behavior

2021-11-26 Thread GitBox


kwin opened a new pull request #16:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/16


   Configuration.getProperties() must return null before update...() has
   been called
   Implement Configuration.updateIfDifferent(...)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Karl Pauls (Jira)


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

Karl Pauls commented on SLING-10938:


[~golinski] - would it be possible to get the error.log for this case?

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: stacktrace.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (SLING-10937) Resource in tested Sling Model not equal to Resource it was adapted from (RESOURCERESOLVER_MOCK)

2021-11-26 Thread Stefan Seifert (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Seifert updated SLING-10937:
---
Summary: Resource in tested Sling Model not equal to Resource it was 
adapted from (RESOURCERESOLVER_MOCK)  (was: Resource in tested Sling Model not 
equal to Resource it was adapted from)

ok, i understand the problem. it should be possible to refactor your test in a 
way that it does not rely on the same-check for resources e.g. using 
any(Resource.class), but this is probably not the point - it is confusing for 
users that it works for JCR_MOCK and the others, but not for 
RESOURCERESOLVER_MOCK.

i think a fix like copy ResourceResolverWrapper from the API and somehow trying 
to fix the adaptTo method in ResourceREsolverResourceWrapper is not the right 
way. the current implementation makes sense - for a resource wrapper. but using 
RESOURCERESOLVER_MOCK without explicitly wrapping the code should not return a 
resource wrapper.

i think the correct way to go would be:
* implement a ResourceProvider in 
sling-org-apache-sling-testing-resourceresolver-mock
* refactor RRMockResourceResolverWrapper to not wrap the existing resource 
resolver, but rely only on resource providers that include the new one from 
resourceresolver-mock. (we might also start up real sling resourceresolver here 
as it is done for JCR_MOCK, but i'm a bit hesitant that this might increase 
test run time more than required)

for the time being as a workaround for your test at hand: switch to JCR_MOCK.

> Resource in tested Sling Model not equal to Resource it was adapted from 
> (RESOURCERESOLVER_MOCK)
> 
>
> Key: SLING-10937
> URL: https://issues.apache.org/jira/browse/SLING-10937
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.1.2
>Reporter: Konrad Windszus
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The resources returned from 
> {{org.apache.sling.testing.mock.sling.RRMockResourceResolverWrapper}} are of 
> type {{ResourceResolverResourceWrapper}} (in case the resource providers are 
> empty).
> When these resources are adapted to a Sling Model, the injected resource is 
> the unwrapped resource which is not equal to the wrapped resource from 
> outside.
> This is due to the fact that {{ResourceResolverResourceWrapper.adaptTo(...)}} 
> is not overwritten but just delegated to the underlying Resource. That makes 
> the Adapter only acting on the unwrapped resource which is not equal to the 
> wrapped one.
> This leads to unexpected behaviour when verifying interactions with mocks 
> taking the resource as argument, as the wrapped resource is never equal to 
> the resource used in the Sling Model given to the mock.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-9638) Update Starter Docker image to be based on the feature model

2021-11-26 Thread Robert Munteanu (Jira)


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

Robert Munteanu commented on SLING-9638:


I have asked DockerHub support about switching the source repository via the 
contact form

{noformat}
Subject: Switching automated builds repository for apache/sling

Hi,

I am working on a project of the Apache Software Foundation which is hosted at 
https://hub.docker.com/r/apache/sling . We are making changes to the way we 
build Docker images and would like to change the source repository from 
https://github.com/apache/sling-org-apache-sling-starter-docker to 
https://github.com/apache/sling-org-apache-sling-starter .

I asked our infra team, who is managing our Docker org, and they pointed me to 
DockerHub support ( https://issues.apache.org/jira/browse/INFRA-21079 ). I 
would like to ask:
- is a change of the source repository possible?
- do the tokens used for building remain the same?
- will old images be erased if we change the source repository?

Best regards,
Robert Munteanu
{noformat}

> Update Starter Docker image to be based on the feature model
> 
>
> Key: SLING-9638
> URL: https://issues.apache.org/jira/browse/SLING-9638
> Project: Sling
>  Issue Type: Sub-task
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Starter 12
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> The Sling Docker image is currently built from 
> https://github.com/apache/sling-org-apache-sling-starter-docker/ and is based 
> on the provisioning model. With the feature model we have a more 
> container-friendly approach where we can ship the feature files and select at 
> runtime what we are going to launch.
> We should also take the opportunity and check if we can generate the Docker 
> image from the starter build itself, which makes it much simpler to develop 
> and evolve it.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Assigned] (SLING-10498) MockConfiguration#delete() does not delete the configuration (still found by ConfigurationAdmin)

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus reassigned SLING-10498:
---

Assignee: Konrad Windszus

> MockConfiguration#delete() does not delete the configuration (still found by 
> ConfigurationAdmin)
> 
>
> Key: SLING-10498
> URL: https://issues.apache.org/jira/browse/SLING-10498
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing OSGi Mock 3.1.2
>Reporter: Henry Kuijpers
>Assignee: Konrad Windszus
>Priority: Major
>
> MockConfiguration#delete does not delete the configuration from the map (in 
> MockConfigurationAdmin), but instead clears the properties of the 
> configuration (while maintaining the PID).
> To mimic a real world scenario, that configuration should in fact be deleted 
> from the map that MockConfigurationAdmin is holding.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SLING-10938) Exception thrown on Sling Starter shutdown in JobManagerConfiguration

2021-11-26 Thread Robert Munteanu (Jira)


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

Robert Munteanu commented on SLING-10938:
-

Thanks for the diff [~golinski]. The async nature of the service user mapping 
registrations makes it harder to reason about why they are happening in the 
first place. It could be an incorrect registration, one processed too late, or 
maybe just 'business as usual' and something that the consumers need to handle.

Would you be able to investigate more and find out more about how this 
registration happens and whether it should happen or not? Thanks!

> Exception thrown on Sling Starter shutdown in JobManagerConfiguration
> -
>
> Key: SLING-10938
> URL: https://issues.apache.org/jira/browse/SLING-10938
> Project: Sling
>  Issue Type: Task
>  Components: Event
>Affects Versions: Event 4.2.24
>Reporter: Michał Goliński
>Priority: Minor
> Attachments: stacktrace.txt
>
>
> On stopping the Sling Starter with Ctrl+C we can occasionally see the 
> following stacktrace:
> {code:java}
> ERROR : bundle org.apache.sling.event:4.2.20 
> (151)[org.apache.sling.event.impl.jobs.config.JobManagerConfiguration(247)] : 
> The activate method has thrown an exception
> java.lang.IllegalArgumentException: Can't create child on a synthetic root
>   at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1006)
>   ...
>   at 
> org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
>   at 
> org.apache.sling.event.impl.support.ResourceHelper.getOrCreateBasePath(ResourceHelper.java:258)
>   at 
> org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.activate(JobManagerConfiguration.java:225)
>   ...
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:439)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.lambda$executeServiceRegistrationsAsync$0(ServiceUserMapperImpl.java:406)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
>     {code}
> This happens also with bundle version 4.2.24.
> This doesn't happen every time, but I've seen up to seven of these at a time 
> (the number of stacktraces changes), see the attached file. This might be 
> similar to SLING-10204 , although in the debugger I can see the 
> ServiceUserMapped being mentioned, not ResourceResolverFactory.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


RE: Release of Sling Mock and OSGi Mock

2021-11-26 Thread Stefan Seifert
hello konrad.

fine for me. there are a few open topics which might lead to additional fixes - 
but if they do not make it in time we can always make another release.

stefan

>-Original Message-
>From: Konrad Windszus 
>Sent: Friday, November 26, 2021 9:44 AM
>To: dev@sling.apache.org
>Subject: Release of Sling Mock and OSGi Mock
>
>Hi,
>I would like to do a release of Sling Mock
>(https://issues.apache.org/jira/projects/SLING/versions/12350607) and OSGi
>Mock (https://issues.apache.org/jira/projects/SLING/versions/12350550)
>soon.
>Is there anything outstanding I should wait for?
>Otherwise I am gonna start the vote next Monday.
>Konrad
>



RE: [VOTE] Release Apache Sling File Installer 1.3.4

2021-11-26 Thread Stefan Seifert
+1

stefan


Re: [VOTE] Release Apache Sling Pipes version 4.3.2

2021-11-26 Thread Robert Munteanu
On Thu, 2021-11-25 at 16:26 +0100, Nicolas Peltier wrote:
> Please vote to approve this release:

+1
Robert


signature.asc
Description: This is a digitally signed message part


Re: [VOTE] Release Apache Sling File Installer 1.3.4

2021-11-26 Thread Robert Munteanu
On Fri, 2021-11-26 at 09:56 +0100, Konrad Windszus wrote:
> Please vote to approve this release:

+1
Robert


signature.asc
Description: This is a digitally signed message part


[VOTE] Release Apache Sling File Installer 1.3.4

2021-11-26 Thread Konrad Windszus
Hi,

We solved 1 issue in this release (2nd attempt, verified via 
https://github.com/apache/sling-org-apache-sling-starter/pull/35):
https://issues.apache.org/jira/projects/SLING/versions/12348651 

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2553/

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2553 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Konrad

Release of Sling Mock and OSGi Mock

2021-11-26 Thread Konrad Windszus
Hi,
I would like to do a release of Sling Mock 
(https://issues.apache.org/jira/projects/SLING/versions/12350607) and OSGi Mock 
(https://issues.apache.org/jira/projects/SLING/versions/12350550) soon.
Is there anything outstanding I should wait for?
Otherwise I am gonna start the vote next Monday.
Konrad




[jira] [Updated] (SLING-10937) Resource in tested Sling Model not equal to Resource it was adapted from

2021-11-26 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/SLING-10937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-10937:

Fix Version/s: (was: Testing Sling Mock 3.1.4)

> Resource in tested Sling Model not equal to Resource it was adapted from
> 
>
> Key: SLING-10937
> URL: https://issues.apache.org/jira/browse/SLING-10937
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.1.2
>Reporter: Konrad Windszus
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The resources returned from 
> {{org.apache.sling.testing.mock.sling.RRMockResourceResolverWrapper}} are of 
> type {{ResourceResolverResourceWrapper}} (in case the resource providers are 
> empty).
> When these resources are adapted to a Sling Model, the injected resource is 
> the unwrapped resource which is not equal to the wrapped resource from 
> outside.
> This is due to the fact that {{ResourceResolverResourceWrapper.adaptTo(...)}} 
> is not overwritten but just delegated to the underlying Resource. That makes 
> the Adapter only acting on the unwrapped resource which is not equal to the 
> wrapped one.
> This leads to unexpected behaviour when verifying interactions with mocks 
> taking the resource as argument, as the wrapped resource is never equal to 
> the resource used in the Sling Model given to the mock.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)