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 da...@apache.org on 2026/10/08 07:24:52 UTC

(jackrabbit-oak) branch trunk updated: OAK-12444: Fix reference-retention timing in DataStoreCommandTest (#3200)

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

rishabhdaim 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 59aaccb171 OAK-12444: Fix reference-retention timing in DataStoreCommandTest (#3200)
59aaccb171 is described below

commit 59aaccb1717f9159eb8d2f953e112d6901683bf4
Author: Rishabh Kumar <ri...@gmail.com>
AuthorDate: Thu Oct 8 12:54:46 2026 +0530

    OAK-12444: Fix reference-retention timing in DataStoreCommandTest (#3200)
---
 .../java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java b/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java
index 640a86273f..ae87298050 100644
--- a/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java
+++ b/oak-run/src/test/java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java
@@ -589,6 +589,13 @@ public class DataStoreCommandTest {
         Data data = prepareData(storeFixture, blobFixture, 10, 5, 0);
         storeFixture.close();
         additionalParams += " --check-consistency-gc true --sweep-only-refs-past-retention true";
+        // Complete a mark pass and age its references past the strict retention cutoff before sweeping.
+        testGc(dump, data, 1000, true, false);
+        try (DataStoreBlobStore blobStore = blobFixture.openDataStore(temporaryFolder.newFolder().getAbsolutePath())) {
+            long referenceTime = blobStore.getAllMetadataRecords(REFERENCES.getType()).stream()
+                    .mapToLong(record -> record.getLastModified()).max().orElseThrow();
+            Clock.SIMPLE.waitUntil(referenceTime + 1);
+        }
         testGc(dump, data, 0, false, false);
     }