This is an automated email from the ASF dual-hosted git repository.
stefanegli pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new e73cb97510 OAK-10526 : fix test regression for mongo 70 split doc
(#1209)
e73cb97510 is described below
commit e73cb9751072a5733d3045c8f1ffd42405a663e5
Author: stefan-egli <[email protected]>
AuthorDate: Tue Nov 14 22:02:44 2023 +0100
OAK-10526 : fix test regression for mongo 70 split doc (#1209)
* OAK-10526 : fix test regression for mongo 70 split doc
* OAK-10526 : sleep 59min, not 60
---
.../oak/plugins/document/VersionGCSplitDocTest.java | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSplitDocTest.java
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSplitDocTest.java
index dae5394fc0..c585f0029e 100644
---
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSplitDocTest.java
+++
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCSplitDocTest.java
@@ -259,8 +259,21 @@ public class VersionGCSplitDocTest {
ns.runBackgroundOperations();
- // wait one hour
- clock.waitUntil(clock.getTime() + HOURS.toMillis(1));
+ // with OAK-10526 split doc maxRev is now set to now
+ // the split doc type 70 GC on mongo uses sweepRev
+ // so to get 70 GCed we need to advance sweepRev
+ // hence instead of a 1 HOUR wait, we now do :
+ // wait 1 min
+ clock.waitUntil(clock.getTime() + MINUTES.toMillis(1));
+
+ // to advance sweepRev : unrelated change + sweep
+ builder = ns.getRoot().builder();
+ builder.child("unrelated");
+ ns.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
+ ns.runBackgroundOperations();
+
+ // wait 59 min
+ clock.waitUntil(clock.getTime() + MINUTES.toMillis(59));
int nodesBeforeGc = countNodeDocuments();
assertEquals(0, countStalePrev());