Author: reschke
Date: Tue Jun 28 09:49:08 2016
New Revision: 1750458

URL: http://svn.apache.org/viewvc?rev=1750458&view=rev
Log:
OAK-4514: ResurrectNodeAfterRevisionGCTest's cleanup may interfere with DS 
disposal (ported to 1.4)

(patch by Marcel Reutegger)

Modified:
    jackrabbit/oak/branches/1.4/   (props changed)
    
jackrabbit/oak/branches/1.4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java

Propchange: jackrabbit/oak/branches/1.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun 28 09:49:08 2016
@@ -1,3 +1,3 @@
 /jackrabbit/oak/branches/1.0:1665962
-/jackrabbit/oak/trunk:1733615,1733875,1733913,1733929,1734230,1734254,1734279,1734941,1735052,1735405,1735484,1735549,1735564,1735588,1735622,1735638,1735919,1735983,1736176,1737309-1737310,1737334,1737349,1737998,1738004,1738775,1738795,1738833,1738950,1738957,1738963,1739894,1740116,1740625-1740626,1740971,1741032,1741339,1741343,1742520,1742888,1742916,1743097,1743172,1743343,1744265,1744959,1745038,1745197,1745368,1746086,1746117,1746342,1746345,1746696,1746981,1747341-1747342,1747492,1747512,1748505,1748553,1748870,1749275,1749350,1749464,1749475,1749645,1749662,1749815,1749872,1749875,1749899,1750076-1750077,1750287
+/jackrabbit/oak/trunk:1733615,1733875,1733913,1733929,1734230,1734254,1734279,1734941,1735052,1735405,1735484,1735549,1735564,1735588,1735622,1735638,1735919,1735983,1736176,1737309-1737310,1737334,1737349,1737998,1738004,1738775,1738795,1738833,1738950,1738957,1738963,1739894,1740116,1740625-1740626,1740971,1741032,1741339,1741343,1742520,1742888,1742916,1743097,1743172,1743343,1744265,1744959,1745038,1745197,1745368,1746086,1746117,1746342,1746345,1746696,1746981,1747341-1747342,1747492,1747512,1748505,1748553,1748870,1749275,1749350,1749464,1749475,1749645,1749662,1749815,1749872,1749875,1749899,1750076-1750077,1750287,1750457
 /jackrabbit/trunk:1345480

Modified: 
jackrabbit/oak/branches/1.4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java?rev=1750458&r1=1750457&r2=1750458&view=diff
==============================================================================
--- 
jackrabbit/oak/branches/1.4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java
 (original)
+++ 
jackrabbit/oak/branches/1.4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ResurrectNodeAfterRevisionGCTest.java
 Tue Jun 28 09:49:08 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
+        }
+    }
 }


Reply via email to