SLING-3017 Improve Karaf integration tests
authorOliver Lietz <olli@apache.org>
Mon, 10 Jul 2017 20:14:43 +0000 (20:14 +0000)
committerOliver Lietz <olli@apache.org>
Mon, 10 Jul 2017 20:14:43 +0000 (20:14 +0000)
* use latest releases
* enable Couchbase IT
* exclude Launchpad Oak ITs until timing issues are fixed

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1801528 13f79535-47bb-0310-9956-ffa450edef68

pom.xml
src/test/java/org/apache/sling/karaf/tests/bootstrap/SlingLaunchpadNosqlCouchbaseIT.java

diff --git a/pom.xml b/pom.xml
index a9349e3..b88fe02 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -92,7 +92,7 @@
     <dependency>
       <groupId>org.apache.sling</groupId>
       <artifactId>org.apache.sling.engine</artifactId>
-      <version>2.6.6</version>
+      <version>2.6.8</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <scope>test</scope>
     </dependency>
     <!-- Couchbase -->
-    <!--
     <dependency>
-      <groupId>org.couchbase.mock</groupId>
+      <groupId>com.couchbase.mock</groupId>
       <artifactId>CouchbaseMock</artifactId>
-      <version>1.4.1</version>
+      <version>1.5.4</version>
       <scope>test</scope>
     </dependency>
-    -->
     <dependency>
       <groupId>com.couchbase.client</groupId>
       <artifactId>couchbase-client</artifactId>
-      <version>1.4.12</version>
+      <version>1.4.13</version>
       <scope>test</scope>
     </dependency>
     <dependency>
             </executions>
             <configuration>
               <redirectTestOutputToFile>true</redirectTestOutputToFile>
+              <excludes>
+                <exclude>**/SlingLaunchpadOak*IT.*</exclude>
+              </excludes>
             </configuration>
           </plugin>
         </plugins>
index 04ed966..babc10c 100644 (file)
@@ -22,11 +22,10 @@ import java.io.IOException;
 
 import javax.inject.Inject;
 
+import com.couchbase.mock.CouchbaseMock;
 import org.apache.sling.api.resource.ResourceProviderFactory;
 import org.apache.sling.karaf.testing.KarafTestSupport;
-// import org.couchbase.mock.CouchbaseMock;
 import org.junit.AfterClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
@@ -47,27 +46,23 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfi
 @ExamReactorStrategy(PerClass.class)
 public class SlingLaunchpadNosqlCouchbaseIT extends KarafTestSupport {
 
-    // private static CouchbaseMock couchbase;
+    private static CouchbaseMock couchbase;
 
     @Inject
     @Filter(timeout = 300000)
     public ResourceProviderFactory resourceProviderFactory;
 
     protected void startCouchbase(final int port) throws IOException, InterruptedException {
-        /*
         couchbase = new CouchbaseMock("localhost", port, 10, 1024);
         couchbase.start();
         couchbase.waitForStartup();
-        */
     }
 
     @AfterClass // TODO does it work? (no - not supported by Pax Exam)
     public static void stopCouchbase() throws Exception {
-        /*
         if (couchbase != null) {
             couchbase.stop();
         }
-        */
     }
 
     @Configuration
@@ -81,7 +76,7 @@ public class SlingLaunchpadNosqlCouchbaseIT extends KarafTestSupport {
             editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "clientId", "sling-resourceprovider-couchbase"),
             editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "bucketName", "sling"),
             editConfigurationFilePut("etc/org.apache.sling.nosql.couchbase.client.CouchbaseClient.factory.config.config", "enabled", "true"),
-            // wrappedBundle(mavenBundle().groupId("org.couchbase.mock").artifactId("CouchbaseMock").versionAsInProject()),
+            wrappedBundle(mavenBundle().groupId("com.couchbase.mock").artifactId("CouchbaseMock").versionAsInProject()),
             wrappedBundle(mavenBundle().groupId("com.couchbase.client").artifactId("couchbase-client").versionAsInProject()),
             wrappedBundle(mavenBundle().groupId("com.intellij").artifactId("annotations").versionAsInProject()),
             mavenBundle().groupId("com.google.code.gson").artifactId("gson").versionAsInProject(),
@@ -93,7 +88,6 @@ public class SlingLaunchpadNosqlCouchbaseIT extends KarafTestSupport {
     }
 
     @Test
-    @Ignore
     public void testResourceProviderFactory() {
         assertNotNull(resourceProviderFactory);
         assertEquals("org.apache.sling.nosql.couchbase.resourceprovider.impl.CouchbaseNoSqlResourceProviderFactory", resourceProviderFactory.getClass().getName());