You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2019/01/09 10:33:43 UTC

[GitHub] bosschaert closed pull request #11: SLING-8113 - defining file in registryhome to capture executionplan s…

bosschaert closed pull request #11: SLING-8113 - defining file in registryhome to capture executionplan s…
URL: https://github.com/apache/sling-org-apache-sling-feature-extension-content/pull/11
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
index ddc7682..673d626 100644
--- a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
+++ b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
@@ -44,8 +44,6 @@
 public class ContentHandler implements ExtensionHandler {
     public static final String PACKAGEREGISTRY_HOME = "packageregistry.home";
 
-    private static final char FACTORY_CONFIG_SEPARATOR = '~';
-
     private static final String REPOSITORY_HOME = "repository.home";
 
     private static final String REGISTRY_FOLDER = "packageregistry";
@@ -121,6 +119,7 @@ public boolean handle(Extension extension, LauncherPrepareContext prepareContext
             // Workaround for too bold relocation mechanism - corresponding details at https://issues.apache.org/jira/browse/MSHADE-156
             final Configuration initcfg = new Configuration("org.UNSHADE.apache.sling.jcr.packageinit.impl.ExecutionPlanRepoInitializer");
             initcfg.getProperties().put("executionplans", executionPlans.toArray(new String[executionPlans.size()]));
+            initcfg.getProperties().put("statusfilepath", registryHome.getAbsolutePath() + "/executedplans.file");
             installationContext.addConfiguration(initcfg.getPid(), null, initcfg.getProperties());
             // Workaround for too bold relocation mechanism - corresponding details at https://issues.apache.org/jira/browse/MSHADE-156
             final Configuration registrycfg = new Configuration("org.UNSHADE.apache.jackrabbit.vault.packaging.registry.impl.FSPackageRegistry");
diff --git a/src/test/java/org/apache/sling/feature/extension/content/ContentHandlerTest.java b/src/test/java/org/apache/sling/feature/extension/content/ContentHandlerTest.java
index 662dfb7..5721457 100644
--- a/src/test/java/org/apache/sling/feature/extension/content/ContentHandlerTest.java
+++ b/src/test/java/org/apache/sling/feature/extension/content/ContentHandlerTest.java
@@ -108,7 +108,11 @@ public void testMultipleStartOrders() throws Exception {
         verify(installationContext).addConfiguration(eq("org.UNSHADE.apache.sling.jcr.packageinit.impl.ExecutionPlanRepoInitializer"), any(), executionPlanCaptor.capture());
         verify(installationContext).addConfiguration(eq("org.UNSHADE.apache.jackrabbit.vault.packaging.registry.impl.FSPackageRegistry"), any(), any());
         Iterator<Dictionary<String, Object>> dictIt = executionPlanCaptor.getAllValues().iterator();
-        final String[] executionplans = (String[]) dictIt.next().get("executionplans");
+        Dictionary<String, Object> dict = dictIt.next();
+        final String[] executionplans = (String[]) dict.get("executionplans");
+        final String statusFileHome = (String)dict.get("statusfilepath");
+        File executedPlansFile = new File(testFolder.getRoot(), "executedplans.file");
+        assertEquals(executedPlansFile.getAbsolutePath(), statusFileHome);
         final String expected_0 =
                 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                         "<executionPlan version=\"1.0\">\n" +


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services