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 318610494ab..c0f88c02c6b 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 @@ -759,7 +759,15 @@ private DocumentNodeStore newStore(int clusterId) { if (clusterId > 0) { builder.setClusterId(clusterId); } - return builder.getNodeStore(); + DocumentNodeStore nodeStore = builder.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"); + } + return nodeStore; } private RevisionVector mergedBranchCommit(Consumer buildFunction) throws Exception {