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/08/24 06:38:27 UTC

(jackrabbit-oak) branch OAK-11062 created (now 4f06acee25)

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

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


      at 4f06acee25 OAK-11062: document-store: refine skipping of MongoDB tests

This branch includes the following new commits:

     new 4f06acee25 OAK-11062: document-store: refine skipping of MongoDB tests

The 1 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.



(jackrabbit-oak) 01/01: OAK-11062: document-store: refine skipping of MongoDB tests

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

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

commit 4f06acee25dbc18416215b3b3048dd1490e66da8
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Sat Aug 24 07:38:07 2024 +0100

    OAK-11062: document-store: refine skipping of MongoDB tests
---
 .../jackrabbit/oak/plugins/document/AbstractDocumentStoreTest.java | 7 +------
 .../jackrabbit/oak/plugins/document/DocumentStoreFixture.java      | 6 +++++-
 2 files changed, 6 insertions(+), 7 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 2a4e9c2b40..653652d6be 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
@@ -23,7 +23,6 @@ import java.util.concurrent.TimeUnit;
 
 import javax.sql.DataSource;
 
-import org.apache.jackrabbit.oak.commons.properties.SystemPropertySupplier;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -45,8 +44,6 @@ 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));
@@ -88,9 +85,7 @@ public abstract class AbstractDocumentStoreTest {
                 DocumentStoreFixture.RDB_MSSQL };
 
         for (DocumentStoreFixture dsf : candidates) {
-            if (SKIP_MONGO && dsf instanceof DocumentStoreFixture.MongoFixture) {
-                LOG.info("Mongo fixture '{}' skipped.", dsf.getName());
-            } else if (dsf.isAvailable()) {
+            if (dsf.isAvailable()) {
                 if (!multi || dsf.hasSinglePersistence()) {
                     result.add(new DocumentStoreFixture[] { dsf });
                     names.add(dsf.getName());
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java
index 3a4efe9db2..2605298be1 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java
@@ -23,6 +23,7 @@ import java.util.List;
 import javax.sql.DataSource;
 
 import org.apache.jackrabbit.oak.commons.FixturesHelper;
+import org.apache.jackrabbit.oak.commons.properties.SystemPropertySupplier;
 import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
 import org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore;
 import org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory;
@@ -236,6 +237,9 @@ public abstract class DocumentStoreFixture {
     }
 
     public static class MongoFixture extends DocumentStoreFixture {
+
+        private static final boolean SKIP_MONGO = SystemPropertySupplier.create("oak.skipMongo", false).loggingTo(LOG).get();
+
         protected List<MongoConnection> connections = Lists.newArrayList();
 
         @Override
@@ -257,7 +261,7 @@ public abstract class DocumentStoreFixture {
 
         @Override
         public boolean isAvailable() {
-            return MongoUtils.isAvailable();
+            return !SKIP_MONGO && MongoUtils.isAvailable();
         }
 
         @Override