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/09/03 16:40:40 UTC
(jackrabbit-oak) 02/02: Revert "OAK-11062: document-store: refine skipping of MongoDB tests (#1670)"
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 1cc37b265f4e2cbebf796b7e7e31336d2649ee0c
Author: Julian Reschke <re...@apache.org>
AuthorDate: Tue Sep 3 17:40:25 2024 +0100
Revert "OAK-11062: document-store: refine skipping of MongoDB tests (#1670)"
This reverts commit e0e5f7c70c1d94835de530a1f2ecec6a002f2264.
---
.../jackrabbit/oak/plugins/document/AbstractDocumentStoreTest.java | 7 ++++++-
.../jackrabbit/oak/plugins/document/DocumentStoreFixture.java | 6 +-----
2 files changed, 7 insertions(+), 6 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 653652d6be..2a4e9c2b40 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,6 +23,7 @@ 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;
@@ -44,6 +45,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));
@@ -85,7 +88,9 @@ public abstract class AbstractDocumentStoreTest {
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 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 2605298be1..3a4efe9db2 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,7 +23,6 @@ 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;
@@ -237,9 +236,6 @@ 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
@@ -261,7 +257,7 @@ public abstract class DocumentStoreFixture {
@Override
public boolean isAvailable() {
- return !SKIP_MONGO && MongoUtils.isAvailable();
+ return MongoUtils.isAvailable();
}
@Override