You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2024/07/31 10:26:36 UTC

(jackrabbit-oak) branch trunk updated (89c1548c91 -> 8ebce4b9d1)

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

reschke pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


    from 89c1548c91 OAK-10993: commons: add better diagnostics to 'FixturesHelper' (#1614)
     new a137df688d OAK-10993: commons: add better diagnostics to 'FixturesHelper' (fix var scope)
     new 60e82709ad Revert "OAK-10993: commons: add better diagnostics to 'FixturesHelper' (fix var scope)"
     new 8ebce4b9d1 OAK-10991: document-store: allow to skip tests for MongoDB

The 3 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:
 .../plugins/document/AbstractDocumentStoreTest.java    | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)


(jackrabbit-oak) 03/03: OAK-10991: document-store: allow to skip tests for MongoDB

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

reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 8ebce4b9d19a26bbe12e8851e724bec9fc8353b5
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Jul 31 11:26:26 2024 +0100

    OAK-10991: document-store: allow to skip tests for MongoDB
---
 .../plugins/document/AbstractDocumentStoreTest.java    | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractDocumentStoreTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractDocumentStoreTest.java
index 95412f8ba3..18be742238 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractDocumentStoreTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractDocumentStoreTest.java
@@ -22,6 +22,7 @@ import java.util.List;
 
 import javax.sql.DataSource;
 
+import org.apache.jackrabbit.oak.commons.properties.SystemPropertySupplier;
 import org.junit.After;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -42,6 +43,8 @@ public abstract class AbstractDocumentStoreTest {
 
     static final Logger LOG = LoggerFactory.getLogger(AbstractDocumentStoreTest.class);
 
+    private static final boolean SKIP_MONGO = SystemPropertySupplier.create("oak.skipMongo", false).loggingTo(LOG).get();
+
     public AbstractDocumentStoreTest(DocumentStoreFixture dsf) {
         this.dsf = dsf;
         this.ds = dsf.createDocumentStore(getBuilder().setClusterId(1));
@@ -52,7 +55,7 @@ public abstract class AbstractDocumentStoreTest {
     public DocumentMK.Builder getBuilder() {
         return new DocumentMK.Builder();
     }
-    
+
     @After
     public void cleanUp() throws Exception {
         removeTestNodes(org.apache.jackrabbit.oak.plugins.document.Collection.NODES, removeMe);
@@ -69,20 +72,27 @@ public abstract class AbstractDocumentStoreTest {
     }
 
     protected static Collection<Object[]> fixtures(boolean multi) {
-        Collection<Object[]> result = new ArrayList<Object[]>();
+        Collection<Object[]> result = new ArrayList<>();
+        Collection<String> names = new ArrayList<>();
+
         DocumentStoreFixture candidates[] = new DocumentStoreFixture[] { DocumentStoreFixture.MEMORY, DocumentStoreFixture.MONGO,
                 DocumentStoreFixture.RDB_H2, DocumentStoreFixture.RDB_DERBY, DocumentStoreFixture.RDB_PG,
                 DocumentStoreFixture.RDB_DB2, DocumentStoreFixture.RDB_MYSQL, DocumentStoreFixture.RDB_ORACLE,
                 DocumentStoreFixture.RDB_MSSQL };
 
         for (DocumentStoreFixture dsf : candidates) {
-            if (dsf.isAvailable()) {
+            if (SKIP_MONGO && dsf instanceof DocumentStoreFixture.MongoFixture) {
+                LOG.info("Mongo fixture '{}' skipped.", dsf.getName());
+            } else if (dsf.isAvailable()) {
                 if (!multi || dsf.hasSinglePersistence()) {
-                    result.add(new Object[] { dsf });
+                    result.add(new DocumentStoreFixture[] { dsf });
+                    names.add(dsf.getName());
                 }
             }
         }
 
+        LOG.info("Running document store test with fixtures {}.", names);
+
         return result;
     }
 


(jackrabbit-oak) 01/03: OAK-10993: commons: add better diagnostics to 'FixturesHelper' (fix var scope)

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

reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit a137df688d788f4cb95fbc61ad785fefcd2b3147
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Jul 31 11:24:12 2024 +0100

    OAK-10993: commons: add better diagnostics to 'FixturesHelper' (fix var scope)
---
 .../src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
index b2f2f07521..5ec64a3495 100644
--- a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
+++ b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
@@ -45,7 +45,7 @@ public final class FixturesHelper {
     /**
      * System property to be used.
      */
-    public static final String RAW_FIXTURES = SystemPropertySupplier.create(PROPNAME, "").loggingTo(LOG).get().trim();
+    private static final String RAW_FIXTURES = SystemPropertySupplier.create(PROPNAME, "").loggingTo(LOG).get().trim();
 
     private FixturesHelper() { }
 


(jackrabbit-oak) 02/03: Revert "OAK-10993: commons: add better diagnostics to 'FixturesHelper' (fix var scope)"

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

reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 60e82709addcbd903de40fb728b22e495e931b54
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Jul 31 11:24:35 2024 +0100

    Revert "OAK-10993: commons: add better diagnostics to 'FixturesHelper' (fix var scope)"
    
    This reverts commit a137df688d788f4cb95fbc61ad785fefcd2b3147.
---
 .../src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
index 5ec64a3495..b2f2f07521 100644
--- a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
+++ b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
@@ -45,7 +45,7 @@ public final class FixturesHelper {
     /**
      * System property to be used.
      */
-    private static final String RAW_FIXTURES = SystemPropertySupplier.create(PROPNAME, "").loggingTo(LOG).get().trim();
+    public static final String RAW_FIXTURES = SystemPropertySupplier.create(PROPNAME, "").loggingTo(LOG).get().trim();
 
     private FixturesHelper() { }