This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/1.22 by this push:
new b4d0b26043 OAK-10940: oak-jcr: improve error message when mongo test
fixture fails (#1574)
b4d0b26043 is described below
commit b4d0b260435d4eb1daac747172285160809b897a
Author: Julian Reschke <[email protected]>
AuthorDate: Tue Jul 9 18:08:43 2024 +0200
OAK-10940: oak-jcr: improve error message when mongo test fixture fails
(#1574)
---
.../java/org/apache/jackrabbit/oak/jcr/OakMongoNSRepositoryStub.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakMongoNSRepositoryStub.java
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakMongoNSRepositoryStub.java
index dcf10f54bf..7c7f3bd7c2 100644
---
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakMongoNSRepositoryStub.java
+++
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakMongoNSRepositoryStub.java
@@ -16,6 +16,7 @@
*/
package org.apache.jackrabbit.oak.jcr;
+import java.util.Objects;
import java.util.Properties;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
@@ -51,7 +52,7 @@ public class OakMongoNSRepositoryStub extends
BaseRepositoryStub {
super(settings);
final DocumentNodeStore store;
try {
- this.connection = MongoUtils.getConnection();
+ this.connection =
Objects.requireNonNull(MongoUtils.getConnection(), "Couldn't obtain
MongoConnection.");
store = new DocumentMK.Builder().
memoryCacheSize(64 * 1024 * 1024).
setPersistentCache("target/persistentCache,time").