You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2019/06/16 06:23:19 UTC

[sling-org-apache-sling-jcr-contentloader] branch master updated (396a2da -> a583f2c)

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

olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git.


    from 396a2da  Updating badges for org-apache-sling-jcr-contentloader
     new 5435d93  SLING-8515 Make Pax Exam testing compliant with Java 9 and higher
     new a583f2c  SLING-7923 Simplify integration tests

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            | 10 +++---
 .../contentloader/it/ContentloaderTestSupport.java | 36 ++++++++--------------
 2 files changed, 18 insertions(+), 28 deletions(-)


[sling-org-apache-sling-jcr-contentloader] 01/02: SLING-8515 Make Pax Exam testing compliant with Java 9 and higher

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git

commit 5435d936faff8ff25a35ad9f3c5d18b4514d76f1
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Jun 16 08:01:12 2019 +0200

    SLING-8515 Make Pax Exam testing compliant with Java 9 and higher
    
    * Use Sling Bundle Parent 35
    * Update Pax Exam to 4.13.1
    * Update Testing PaxExam to 3.0.0
    * Update Felix Framework to 6.0.3
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index c64cfb6..bab7bf3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,8 +23,8 @@
 
     <parent>
         <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>34</version>
+        <artifactId>sling-bundle-parent</artifactId>
+        <version>35</version>
         <relativePath />
     </parent>
 
@@ -36,7 +36,7 @@
 
   <properties>
     <sling.java.version>8</sling.java.version>
-    <org.ops4j.pax.exam.version>4.12.0</org.ops4j.pax.exam.version>
+    <org.ops4j.pax.exam.version>4.13.1</org.ops4j.pax.exam.version>
   </properties>
 
   <scm>
@@ -222,7 +222,7 @@
       <dependency>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.framework</artifactId>
-        <version>5.6.10</version>
+        <version>6.0.3</version>
         <scope>test</scope>
       </dependency>
       <!-- Apache Sling -->
@@ -235,7 +235,7 @@
       <dependency>
         <groupId>org.apache.sling</groupId>
         <artifactId>org.apache.sling.testing.paxexam</artifactId>
-        <version>2.0.0</version>
+        <version>3.0.0</version>
         <scope>test</scope>
       </dependency>
     <!-- testing -->


[sling-org-apache-sling-jcr-contentloader] 02/02: SLING-7923 Simplify integration tests

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git

commit a583f2cf7c1021542f025fef3f7535e33db1adfe
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Jun 16 08:22:58 2019 +0200

    SLING-7923 Simplify integration tests
    
    Use ModifiableCompositeOption to remove Content Loader bundle from quickstart
---
 .../contentloader/it/ContentloaderTestSupport.java | 36 ++++++++--------------
 1 file changed, 13 insertions(+), 23 deletions(-)

diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java b/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java
index e5e5bca..5ae7659 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java
@@ -18,19 +18,8 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingResourcePresence;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration;
-
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.Arrays;
-import java.util.Objects;
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
 
@@ -44,8 +33,7 @@ import org.junit.After;
 import org.junit.Before;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.options.CompositeOption;
-import org.ops4j.pax.exam.options.DefaultCompositeOption;
+import org.ops4j.pax.exam.options.ModifiableCompositeOption;
 import org.ops4j.pax.tinybundles.core.TinyBundle;
 import org.ops4j.pax.tinybundles.core.TinyBundles;
 import org.osgi.framework.Bundle;
@@ -54,6 +42,15 @@ import org.osgi.framework.Constants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar;
+import static org.apache.sling.testing.paxexam.SlingOptions.slingResourcePresence;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration;
+
 public abstract class ContentloaderTestSupport extends TestSupport {
 
     @Inject
@@ -121,14 +118,8 @@ public abstract class ContentloaderTestSupport extends TestSupport {
 
     @Configuration
     public Option[] configuration() {
-    	//workaround to get the required jcr.base bundle into the runtime
-    	SlingOptions.versionResolver.setVersionFromProject("org.apache.sling", "org.apache.sling.jcr.base");
-    	
-        CompositeOption quickstart = (CompositeOption) quickstart();
-        final Option[] options = Arrays.stream(quickstart.getOptions()).filter(e -> !Objects.deepEquals(e,
-            mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.jcr.contentloader").version(SlingOptions.versionResolver.getVersion("org.apache.sling", "org.apache.sling.jcr.contentloader"))
-        )).toArray(Option[]::new);
-        quickstart = new DefaultCompositeOption(options);
+        final Option contentloader = mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.jcr.contentloader").version(SlingOptions.versionResolver.getVersion("org.apache.sling", "org.apache.sling.jcr.contentloader"));
+        final ModifiableCompositeOption quickstart = quickstart().remove(contentloader);
         return new Option[]{
             super.baseConfiguration(),
             quickstart,
@@ -143,13 +134,12 @@ public abstract class ContentloaderTestSupport extends TestSupport {
         };
     }
 
-    protected Option quickstart() {
+    protected ModifiableCompositeOption quickstart() {
         final int httpPort = findFreePort();
         final String workingDirectory = workingDirectory();
         return slingQuickstartOakTar(workingDirectory, httpPort);
     }
 
-
     private InputStream getTestBundleStream() throws Exception {
         final TinyBundle bundle = TinyBundles.bundle().set(Constants.BUNDLE_SYMBOLICNAME, bundleSymbolicName);
         return setupTestBundle(bundle).build(TinyBundles.withBnd());