Skip to content

Fix master CI: eviction-guard test premise after dropping unique index#495

Merged
dereuromark merged 1 commit into
masterfrom
fix/eviction-test-after-unique-drop
May 8, 2026
Merged

Fix master CI: eviction-guard test premise after dropping unique index#495
dereuromark merged 1 commit into
masterfrom
fix/eviction-test-after-unique-drop

Conversation

@dereuromark
Copy link
Copy Markdown
Owner

Why master is red

PR #493 added testAddDoesNotEvictRecentRowOnSamePidServer, asserting that a second add() on the same (pid, server) throws QueryException (the unique-index collision). PR #494 then dropped that unique index, so the second insert now succeeds — the test fails on master.

Fix

Reframe the test to verify what it actually cares about: the eviction guard inside add() (the modified < threshold) must not touch a fresh row. After the second add() on the same (pid, server), assert the pre-existing fresh row still exists.

The duplicate-allowed behavior is already covered by testAddAllowsDuplicatePidServer (added in #494), so no coverage is lost.

…ue index

testAddDoesNotEvictRecentRowOnSamePidServer was asserting QueryException,
which fired before #494 because the unique (pid, server) index rejected
the second insert. With the unique constraint dropped, the second insert
succeeds, so the test premise no longer holds and master CI failed.

Reframe the test to verify what it actually cares about: the eviction
guard (`modified <` threshold) inside add() must NOT remove a fresh
row. After the second add() on the same (pid, server), assert the
pre-existing fresh row still exists. Coverage of the threshold check
is preserved; the duplicate-allowed behavior is already covered by
testAddAllowsDuplicatePidServer.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 8, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.55%. Comparing base (85dbb81) to head (27892e5).
⚠️ Report is 1 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #495      +/-   ##
============================================
- Coverage     77.58%   77.55%   -0.03%     
  Complexity      972      972              
============================================
  Files            45       45              
  Lines          3266     3262       -4     
============================================
- Hits           2534     2530       -4     
  Misses          732      732              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dereuromark dereuromark merged commit b4122ef into master May 8, 2026
16 checks passed
@dereuromark dereuromark deleted the fix/eviction-test-after-unique-drop branch May 8, 2026 15:19
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.

2 participants