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 696144ca14 OAK-10416: AbstractTwoNodeTest: ensure RDB fixture uses 
empty DB (#1084)
696144ca14 is described below

commit 696144ca14085b35e9acc48ad4ae34d378124cd9
Author: Julian Reschke <[email protected]>
AuthorDate: Wed Aug 23 16:48:50 2023 +0200

    OAK-10416: AbstractTwoNodeTest: ensure RDB fixture uses empty DB (#1084)
---
 .../jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
index 0b3dfbcdae..35d299f517 100644
--- 
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
+++ 
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
@@ -25,6 +25,7 @@ import com.google.common.collect.Lists;
 import com.mongodb.ReadPreference;
 
 import org.apache.jackrabbit.oak.plugins.document.mongo.MongoTestUtils;
+import org.apache.jackrabbit.oak.plugins.document.rdb.RDBOptions;
 import org.apache.jackrabbit.oak.stats.Clock;
 import org.junit.After;
 import org.junit.Before;
@@ -70,7 +71,11 @@ public class AbstractTwoNodeTest {
         List<Object[]> fixtures = Lists.newArrayList();
         fixtures.add(new Object[] {new DocumentStoreFixture.MemoryFixture()});
 
-        DocumentStoreFixture rdb = new 
DocumentStoreFixture.RDBFixture("RDB-H2(file)", 
"jdbc:h2:file:./target/ds-test", "sa", "");
+        DocumentStoreFixture.RDBFixture rdb = new 
DocumentStoreFixture.RDBFixture("RDB-H2(file)", "jdbc:h2:file:./target/ds-test",
+                "sa", "");
+        // ensure we have an empty database to start with
+        rdb.setRDBOptions(
+                new RDBOptions().tablePrefix("A2NT" + 
Long.toHexString(System.currentTimeMillis())).dropTablesOnClose(true));
         if (rdb.isAvailable()) {
             fixtures.add(new Object[] { rdb });
         }

Reply via email to