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 2016/06/28 09:35:19 UTC

svn commit: r1750457 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java

Author: reschke
Date: Tue Jun 28 09:35:19 2016
New Revision: 1750457

URL: http://svn.apache.org/viewvc?rev=1750457&view=rev
Log:
OAK-4514: ResurrectNodeAfterRevisionGCTest's cleanup may interfere with DS disposal

(patch by Marcel Reutegger)

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java?rev=1750457&r1=1750456&r2=1750457&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java Tue Jun 28 09:35:19 2016
@@ -67,10 +67,10 @@ public class ResurrectNodeAfterRevisionG
         c = new Clock.Virtual();
         c.waitUntil(System.currentTimeMillis());
         Revision.setClock(c);
-        ns1 = new DocumentMK.Builder().setAsyncDelay(0)
-                .clock(c).setClusterId(1).setDocumentStore(ds1).getNodeStore();
-        ns2 = new DocumentMK.Builder().setAsyncDelay(0)
-                .clock(c).setClusterId(2).setDocumentStore(ds2).getNodeStore();
+        ns1 = new DocumentMK.Builder().setAsyncDelay(0).clock(c)
+                .setClusterId(1).setDocumentStore(wrap(ds1)).getNodeStore();
+        ns2 = new DocumentMK.Builder().setAsyncDelay(0).clock(c)
+                .setClusterId(2).setDocumentStore(wrap(ds2)).getNodeStore();
     }
 
     @After
@@ -251,4 +251,20 @@ public class ResurrectNodeAfterRevisionG
             throws CommitFailedException {
         store.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
     }
+
+    private static DocumentStore wrap(DocumentStore store) {
+        return new DSWrapper(store);
+    }
+
+    private static class DSWrapper extends DocumentStoreWrapper {
+
+        DSWrapper(DocumentStore store) {
+            super(store);
+        }
+
+        @Override
+        public void dispose() {
+            // ignore
+        }
+    }
 }