Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8193

Repository is not cleaned up post test execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.3.0
    • None
    • None
    • None

      On running the ITs in info.magnolia.sso.setup.SsoModuleVersionHandlerTest always the first test passes, but the second and third tests always fail with the below trace.

      By the first looks of it, it seems like the resource imported for the first executed test still persists in the JCR repository which is preventing the subsequent tests from passing.

      Running info.magnolia.sso.setup.SsoModuleVersionHandlerTest
      2021-09-29 13:24:37,805 WARN  info.magnolia.module.InstallContextImpl           : [5/10 tasks - Magnolia SSO module (version 1.2.0-cloud-SNAPSHOT)]> sso-connector and magnolia-sso are incompatible modules, please remove the connector and its configuration before installing this one.
      java.lang.RuntimeException: java.lang.RuntimeException: Error importing /mgnl-bootstrap/magnolia-sso/userroles.anonymous.acl_uri.01.yaml: This node already exists: /anonymous/acl_uri/1
              at info.magnolia.importexport.BootstrapUtil.bootstrap(BootstrapUtil.java:157)
              at info.magnolia.importexport.BootstrapUtil.bootstrap(BootstrapUtil.java:83)
              at info.magnolia.module.delta.BootstrapResourcesTask.bootstrap(BootstrapResourcesTask.java:82)
              at info.magnolia.module.delta.BootstrapResourcesTask.execute(BootstrapResourcesTask.java:74)
              at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:503)
              at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:485)
              at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:272)
              at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:407)
              at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:404)
              at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:378)
              at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:266)
              at info.magnolia.module.ModuleVersionHandlerTestCase.executeUpdatesAsIfTheCurrentlyInstalledVersionWas(ModuleVersionHandlerTestCase.java:288)
              at info.magnolia.sso.setup.SsoModuleVersionHandlerTest.freshInstallPutsTheSSOClientCallbackBeforeForm(SsoModuleVersionHandlerTest.java:103)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
              at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
              at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
              at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
              at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
              at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
              at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
              at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
              at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
              at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
              at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
              at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
              at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
              at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
              at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:212)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208)
              at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
              at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
              at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:141)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:121)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
              at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:141)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:121)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
              at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
              at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
              at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
              at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
              at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
              at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
              at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
              at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
              at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
      Caused by: java.lang.RuntimeException: Error importing /mgnl-bootstrap/magnolia-sso/userroles.anonymous.acl_uri.01.yaml: This node already exists: /anonymous/acl_uri/1
              at info.magnolia.importexport.DataTransporter.importYamlStream(DataTransporter.java:480)
              at info.magnolia.importexport.command.JcrImportCommand.execute(JcrImportCommand.java:68)
              at info.magnolia.importexport.BootstrapUtil.bootstrap(BootstrapUtil.java:151)
              ... 71 more
      Caused by: javax.jcr.ItemExistsException: This node already exists: /anonymous/acl_uri/1
              at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1299)
              at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:111)
              at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:37)
              at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
              at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
              at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1818)
              at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1778)
              at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129)
              at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131)
              at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129)
              at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131)
              at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129)
              at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131)
              at info.magnolia.jcr.wrapper.MgnlPropertySettingNodeWrapper.addNode(MgnlPropertySettingNodeWrapper.java:210)
              at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129)
              at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131)
              at info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper.addNode(MgnlAuditLoggingContentDecoratorNodeWrapper.java:84)
              at info.magnolia.jcr.wrapper.DelegateNodeWrapper.addNode(DelegateNodeWrapper.java:129)
              at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.addNode(ContentDecoratorNodeWrapper.java:131)
              at info.magnolia.importexport.DataTransporter.yaml2Jcr(DataTransporter.java:778)
              at info.magnolia.importexport.DataTransporter.importYamlStream(DataTransporter.java:472)
      

        Acceptance criteria

              mgeljic Mikaël Geljić
              rdhar Rishab Dhar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD