Skip to content

chore: add test for ttl behavior#3218

Open
tstirrat15 wants to merge 1 commit into
mainfrom
tstirrat/add-cache-ttl-test
Open

chore: add test for ttl behavior#3218
tstirrat15 wants to merge 1 commit into
mainfrom
tstirrat/add-cache-ttl-test

Conversation

@tstirrat15

Copy link
Copy Markdown
Contributor

Description

We had questions about whether TTL behavior was working as expected in the new caching library so I wrote a test.

Changes

  • Add TTL test
  • Remove Wait() from interface, since the implementation that required it (ristretto) no longer exists.

Testing

Review.

@tstirrat15 tstirrat15 marked this pull request as ready for review July 8, 2026 12:57
@tstirrat15 tstirrat15 requested a review from a team as a code owner July 8, 2026 12:57
@github-actions github-actions Bot added area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Jul 8, 2026
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 7230fde Previous: cbdf06c Ratio
BenchmarkDatastoreDriver/cockroachdb-overlap-static/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) 34958513 ns/op 175021 B/op 20202 allocs/op 6805173 ns/op 172708 B/op 20195 allocs/op 5.14
BenchmarkDatastoreDriver/cockroachdb-overlap-static/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) - ns/op 34958513 ns/op 6805173 ns/op 5.14
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) 35002488 ns/op 173914 B/op 20199 allocs/op 6853237 ns/op 172793 B/op 20195 allocs/op 5.11
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) - ns/op 35002488 ns/op 6853237 ns/op 5.11
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/Touch (github.com/authzed/spicedb/internal/datastore/benchmark) 6259214 ns/op 22187 B/op 287 allocs/op 2857511 ns/op 22094 B/op 287 allocs/op 2.19
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/Touch (github.com/authzed/spicedb/internal/datastore/benchmark) - ns/op 6259214 ns/op 2857511 ns/op 2.19
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/Create (github.com/authzed/spicedb/internal/datastore/benchmark) 6289606 ns/op 19549 B/op 281 allocs/op 2004369 ns/op 19414 B/op 281 allocs/op 3.14
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/Create (github.com/authzed/spicedb/internal/datastore/benchmark) - ns/op 6289606 ns/op 2004369 ns/op 3.14

This comment was automatically generated by workflow using github-action-benchmark.

@miparnisari miparnisari force-pushed the tstirrat/add-cache-ttl-test branch from 7230fde to fa34281 Compare July 10, 2026 20:08
@miparnisari miparnisari enabled auto-merge (squash) July 10, 2026 20:08
@tstirrat15 tstirrat15 force-pushed the tstirrat/add-cache-ttl-test branch from fa34281 to bb5e67e Compare July 13, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) Skip-Changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants