Skip to content

Widen L1 cache TTL test windows to reduce CI flakes - #472

Merged
schmitch merged 2 commits into
mainfrom
copilot/fix-flaky-l1-ttl-tests
Oct 24, 2026
Merged

schmitch merged 2 commits into
mainfrom
copilot/fix-flaky-l1-ttl-tests

Conversation

Copilot AI commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Two L1 cache tests allow only 100 ms between insertion and a cache-hit assertion, causing spurious failures on busy CI runners.

  • Factory lifetime: Use a 1 s lifetime and 3 s TTL, with waits that distinguish factory expiry from TTL capping.
  • TTL expiry: Increase the TTL to 1 s and wait 1.5 s before checking expiry.
  • Scope: Preserve every assertion; no production changes. Add a changelog fragment.

Co-authored-by: schmitch <1641401+schmitch@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix flaky tests for cache's L1 TTL Widen L1 cache TTL test windows to reduce CI flakes Oct 24, 2026
Copilot AI requested a review from schmitch October 24, 2026 16:23
@schmitch
schmitch requested a balanced review from Copilot October 24, 2026 17:14
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copilot AI 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.

🟢 Approval recommended

The narrow test-only changes match the requested timing adjustments, preserve behavioral checks, and have no identified blocking issues.

No open issues 🎉

What changed in this PR

This PR addresses #471 by widening timing windows in two L1 cache tests to reduce CI flakes without changing production behavior or removing assertions.

Changes:

  • Increase factory-lifetime and TTL windows, with waits that preserve lifetime-expiry and TTL-capping checks.
  • Increase the TTL-expiry test’s TTL to 1 second and expiry wait to 1.5 seconds.
  • Add a changelog fragment documenting the test reliability improvement.
File Description
docs/​changes/​2.0.0/​471.fixed.md Documents the wider test timing windows.
crates/​cache/​tests/​l1_unit.rs Adjusts lifetimes, TTLs, waits, and messages while preserving assertions.

Review effort: Balanced

@schmitch
schmitch marked this pull request as ready for review October 24, 2026 17:17
@schmitch
schmitch enabled auto-merge October 24, 2026 17:17
@schmitch
schmitch added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 34898bb Oct 24, 2026
18 of 19 checks passed
@schmitch
schmitch deleted the copilot/fix-flaky-l1-ttl-tests branch October 24, 2026 17:29
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky tests: the cache's L1 TTL tests give an entry 100 ms to survive the next call

3 participants