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 2024/11/06 13:16:24 UTC

(jackrabbit-oak) branch OAK-11254 created (now 2e98335099)

This is an automated email from the ASF dual-hosted git repository.

stefanegli pushed a change to branch OAK-11254
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


      at 2e98335099 OAK-11254 : added sleep after creation of DocumentNodeStore to reduce likelyhood of backgroundPurge to interfere with testing and clean up branch commits on root

This branch includes the following new commits:

     new 2e98335099 OAK-11254 : added sleep after creation of DocumentNodeStore to reduce likelyhood of backgroundPurge to interfere with testing and clean up branch commits on root

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(jackrabbit-oak) 01/01: OAK-11254 : added sleep after creation of DocumentNodeStore to reduce likelyhood of backgroundPurge to interfere with testing and clean up branch commits on root

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stefanegli pushed a commit to branch OAK-11254
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 2e983350993ba40d7a5733b27e176d2643b84d60
Author: Stefan Egli <st...@apache.org>
AuthorDate: Wed Nov 6 14:16:11 2024 +0100

    OAK-11254 : added sleep after creation of DocumentNodeStore to reduce likelyhood of backgroundPurge to interfere with testing and clean up branch commits on root
---
 .../oak/plugins/document/BranchCommitGCTest.java           |  8 ++++++++
 .../oak/plugins/document/VersionGarbageCollectorIT.java    | 14 ++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
index d588018d05..318610494a 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchCommitGCTest.java
@@ -38,6 +38,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 
 import java.io.IOException;
@@ -108,6 +109,13 @@ public class BranchCommitGCTest {
         VersionGarbageCollectorIT.staticStore = store;
         originalFullGcMode = VersionGarbageCollector.getFullGcMode();
         writeStaticField(VersionGarbageCollector.class, "fullGcMode", fullGcMode, true);
+        // OAK-11254 : adding a temporary sleep to reduce likelyhood of
+        // backgroundPurge to interfere with test
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException e) {
+            fail("got interrupted");
+        }
     }
 
     @After
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 7493174259..5cddf609f8 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
@@ -317,6 +317,13 @@ public class VersionGarbageCollectorIT {
                 .setLeaseCheckMode(LeaseCheckMode.DISABLED)
                 .setDocumentStore(ds1).setAsyncDelay(0);
         store1 = documentMKBuilder.getNodeStore();
+        // OAK-11254 : adding a temporary sleep to reduce likelyhood of
+        // backgroundPurge to interfere with test
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException e) {
+            fail("got interrupted");
+        }
     }
 
     private void createSecondaryStore(LeaseCheckMode leaseCheckNode)
@@ -347,6 +354,13 @@ public class VersionGarbageCollectorIT {
         // custom fullGcMode needs to be set after each node store creation, since the VersionGarbageCollector
         // constructor sets the fullGcMode to the value read from OSGI Configuration - method setFullGcMode
         writeStaticField(VersionGarbageCollector.class, "fullGcMode", fullGcMode, true);
+        // OAK-11254 : adding a temporary sleep to reduce likelyhood of
+        // backgroundPurge to interfere with test
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException e) {
+            fail("got interrupted");
+        }
     }
 
     private static final Set<Thread> tbefore = new HashSet<>();