Skip to content

OAK-12145 : add compatibility tests for Caffeine migration (PR 2807)#2811

Open
rishabhdaim wants to merge 5 commits intotrunkfrom
OAK-12145
Open

OAK-12145 : add compatibility tests for Caffeine migration (PR 2807)#2811
rishabhdaim wants to merge 5 commits intotrunkfrom
OAK-12145

Conversation

@rishabhdaim
Copy link
Contributor

Summary

Adds implementation-independent compatibility tests for every class touched by the Guava-to-Caffeine cache migration in OAK-11946 / PR #2807.

All new tests reference only Oak-level types (CacheLIRS, CacheStats, DiffCache, etc.) — no direct imports of org.apache.jackrabbit.guava.common.cache.* or com.github.benmanes.caffeine.cache.*. The same test suite can be cherry-picked onto OAK-11946 and run unchanged; any failure there is a migration compatibility gap, not a test defect.

Changes

Module Files What's covered
oak-core-spi AbstractCacheStatsTest, CacheLIRSCompatibilityTest, EmpiricalWeigherTest Stats counters/rates/reset, get/load/eviction callbacks, weigher overhead
oak-store-document DocumentNodeStoreBuilderTest, NodeDocumentCacheTest, MemoryDiffCacheTest, TieredDiffCacheTest, LocalDiffCacheCompatibilityTest, PersistentCacheCompatibilityTest, CommitValueResolverTest, DocumentNodeStoreTest Builder cache selection, cache CRUD, ExecutionException contract, invalidation, persistent cache durability
oak-run-commons DocumentNodeStoreHelperTest getNodesCache return type and asMap contract
oak-search ExtractedTextCacheTest Stats request/miss counts
oak-search-elastic ElasticIndexStatisticsCompatibilityTest Cache hit, background refresh, stale-value-during-refresh, failure retention
oak-segment-tar SegmentCacheTest Loader failure wrapped in ExecutionException
oak-blob BlobIdSetCompatibilityTest Cache miss / file-persistence semantics
oak-blob-cloud S3BackendTest Expiry setters, cache enable/disable, URI cache hit
oak-blob-cloud-azure AzureBlobStoreBackendCompatibilityTest, AzureBlobStoreBackendV8Test Expiry setters, cache enable/disable

Test Plan

  • All new tests pass on this branch (Guava baseline)
  • Cherry-pick to OAK-11946 and verify same tests pass (next step)
  • Any failure on OAK-11946 is treated as a compatibility gap to fix there

Links

Add implementation-independent test coverage for all classes affected
by the Guava-to-Caffeine cache migration in OAK-11946. Tests reference
only Oak-level types (CacheLIRS, CacheStats, DiffCache, etc.) so the
same suite can be cherry-picked to OAK-11946 and run unchanged; any
failure there is a migration compatibility gap.

Modules covered:
- oak-core-spi: AbstractCacheStats, CacheLIRS, EmpiricalWeigher
- oak-store-document: DocumentNodeStoreBuilder, NodeDocumentCache,
  MemoryDiffCache, LocalDiffCache, TieredDiffCache,
  CachingCommitValueResolver, DocumentNodeStore, PersistentCache
- oak-run-commons: DocumentNodeStoreHelper
- oak-search: ExtractedTextCache (stats tracking)
- oak-search-elastic: ElasticIndexStatistics (cache, refresh, failure)
- oak-segment-tar: SegmentCache (loader failure contract)
- oak-blob: BlobIdSet (cache miss / persistence semantics)
- oak-blob-cloud: S3Backend (expiry, cache enable/disable)
- oak-blob-cloud-azure: AzureBlobStoreBackend,
  AzureBlobStoreBackendV8 (expiry, cache enable/disable)
@rishabhdaim rishabhdaim self-assigned this Mar 23, 2026
@rishabhdaim rishabhdaim requested a review from reschke March 23, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant