[jira] [Commented] (SLING-4283) Use config from builder in testing application

2015-01-06 Thread Chetan Mehrotra (JIRA)

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

Chetan Mehrotra commented on SLING-4283:


bq. So +1 for supporting sub directories in the plugin

Opened SLING-4284 for that

> Use config from builder in testing application
> --
>
> Key: SLING-4283
> URL: https://issues.apache.org/jira/browse/SLING-4283
> Project: Sling
>  Issue Type: Sub-task
>  Components: Testing
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Launchpad Testing 7
>
>
> The testing application does not use the config present in 
> {{org.apache.sling.launchpad}}. This cause test failures when running with 
> Oak as required configuration is not installed [1]
> As a fix the testing module should use the config from launchpad module
> [1] http://markmail.org/thread/xfljme3swaexpcvw



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


[jira] [Commented] (SLING-4283) Use config from builder in testing application

2015-01-05 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-4283:
-

The launchpad plugin code dates back to a time before we added run mode support 
for the configurations; at that time we didnt have sub directories. 
Unfortunately, when we added run mode support, we forgot to change this code. 
So +1 for supporting sub directories in the plugin

> Use config from builder in testing application
> --
>
> Key: SLING-4283
> URL: https://issues.apache.org/jira/browse/SLING-4283
> Project: Sling
>  Issue Type: Sub-task
>  Components: Testing
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Launchpad Testing 7
>
>
> The testing application does not use the config present in 
> {{org.apache.sling.launchpad}}. This cause test failures when running with 
> Oak as required configuration is not installed [1]
> As a fix the testing module should use the config from launchpad module
> [1] http://markmail.org/thread/xfljme3swaexpcvw



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


[jira] [Commented] (SLING-4283) Use config from builder in testing application

2015-01-05 Thread Chetan Mehrotra (JIRA)

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

Chetan Mehrotra commented on SLING-4283:


Maven Launchpad Plugin does have support for extracting the zipped config and 
use it as part of Sling launch [1]. To make use of that following dependency 
needs to be added

{code:xml}

org.apache.sling
org.apache.sling.launchpad
8-SNAPSHOT
partialbundlelist
bundlelist

{code}

This triggers unpacking of the config files to {{target/tmpConfigDir}}. However 
current logic does not handle subdirectory in config folder [2] (also see 
comment at handleConfigSubpath in [2]) due to which these config files are not 
picked up.

{code:title=BundleListContentProvider.java|linenumbers=true|firstline=224}
private Iterator handleConfigSubpath(String path) {
// We don't handle config subpaths for now, but do not 
// warn if we're asked for the children of a file, just
// return empty in that case
final File f = getConfigFile(path);
if(!f.exists()) {
getLog().warn("BundleListContentProvider cannot get children of 
config path: " + path);
}
return EMPTY_STRING_LIST.iterator();
}
{code}

Looking at the code it appears that sub directories can easily be support by 
changing the login in [2] to not filter out directories and fix the logic in 
{{handleConfigSubpath}} . Sling launchpad would then do the required traversal

[~bdelacretaz] [~cziegeler] Thoughts?

Another workaround would be to set {{sling.fileinstall.dir}} in 
testing/src/test/config/sling.properties and then using maven, unpack the 
config in that folder

Or another shortterm workaround is to copy the required config files. Currently 
we have anyway copied the SegmentNodeStore service config so we can add few 
more and fix the issue in Launchpad plugin going forward!

[1] 
https://github.com/apache/sling/blob/trunk/tooling/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java#L289-300
[2] 
https://github.com/apache/sling/blob/trunk/tooling/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/BundleListContentProvider.java#L72-93

> Use config from builder in testing application
> --
>
> Key: SLING-4283
> URL: https://issues.apache.org/jira/browse/SLING-4283
> Project: Sling
>  Issue Type: Sub-task
>  Components: Testing
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Launchpad Testing 7
>
>
> The testing application does not use the config present in 
> {{org.apache.sling.launchpad}}. This cause test failures when running with 
> Oak as required configuration is not installed [1]
> As a fix the testing module should use the config from launchpad module
> [1] http://markmail.org/thread/xfljme3swaexpcvw



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