You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/03/09 18:31:32 UTC

[sling-org-apache-sling-jcr-packageinit] 01/01: SLING-10202 add failing test

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch bugfix/fix-double-execution
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-packageinit.git

commit 567df1eadf999e4b787ce5ead89d7163c1f10b7c
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Mar 9 19:31:07 2021 +0100

    SLING-10202 add failing test
---
 .../sling/jcr/packageinit/ExecutionPlanRepoInitializerTest.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/sling/jcr/packageinit/ExecutionPlanRepoInitializerTest.java b/src/test/java/org/apache/sling/jcr/packageinit/ExecutionPlanRepoInitializerTest.java
index 123a3cd..b7ba378 100644
--- a/src/test/java/org/apache/sling/jcr/packageinit/ExecutionPlanRepoInitializerTest.java
+++ b/src/test/java/org/apache/sling/jcr/packageinit/ExecutionPlanRepoInitializerTest.java
@@ -40,6 +40,7 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.jackrabbit.vault.packaging.PackageException;
 import org.apache.jackrabbit.vault.packaging.PackageId;
 import org.apache.jackrabbit.vault.packaging.registry.ExecutionPlan;
@@ -185,7 +186,9 @@ public class ExecutionPlanRepoInitializerTest {
         when(registry.createExecutionPlan()).thenReturn(builder2);
         
         MockOsgi.deactivate(initializer, context.bundleContext());
-        initializer = registerRepoInitializer(EXECUTIONSPLANS);
+        // 2nd time register in inverted order
+        initializer = registerRepoInitializer(new String[] { EXECUTIONPLAN_2, EXECUTIONPLAN_1 });
+        cdl = new CountDownLatch(1);
         processRepository(initializer, cdl, foundExceptions);
         
         cdl.await(500, TimeUnit.MILLISECONDS);