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 st...@apache.org on 2023/11/23 10:27:14 UTC
(jackrabbit-oak) 01/01: OAK-10559 : closing secondary to avoid test interference
This is an automated email from the ASF dual-hosted git repository.
stefanegli pushed a commit to branch OAK-10559-3
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit 2e79b250a7e499fe144886d5cb3311d45c146f25
Author: Stefan Egli <st...@apache.org>
AuthorDate: Thu Nov 23 11:26:58 2023 +0100
OAK-10559 : closing secondary to avoid test interference
---
.../oak/plugins/document/VersionGarbageCollectorIT.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
index f46d4cdd32..3935c5d85a 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
@@ -97,6 +97,8 @@ public class VersionGarbageCollectorIT {
private DocumentNodeStore store;
+ private DocumentNodeStore secondary;
+
private VersionGarbageCollector gc;
private ExecutorService execService;
@@ -141,6 +143,13 @@ public class VersionGarbageCollectorIT {
if (store != null) {
store.dispose();
}
+ if (secondary != null) {
+ try {
+ secondary.dispose();
+ } catch(Exception e) {
+ // ignore
+ }
+ }
Revision.resetClockToDefault();
execService.shutdown();
execService.awaitTermination(1, MINUTES);
@@ -430,10 +439,11 @@ public class VersionGarbageCollectorIT {
}
private DocumentNodeStore createSecondary() {
- return new DocumentMK.Builder().clock(clock)
+ secondary = new DocumentMK.Builder().clock(clock)
.setLeaseCheckMode(LeaseCheckMode.DISABLED)
.setDocumentStore(store.getDocumentStore()).setAsyncDelay(0)
.setClusterId(2).getNodeStore();
+ return secondary;
}
private void createLeaf(DocumentNodeStore s, String... pathElems) throws Exception {