Skip to content

test: improve lock_manager branch coverage to 100%#54

Merged
poyrazK merged 1 commit intomainfrom
test/lock-manager-coverage
Apr 19, 2026
Merged

test: improve lock_manager branch coverage to 100%#54
poyrazK merged 1 commit intomainfrom
test/lock-manager-coverage

Conversation

@poyrazK
Copy link
Copy Markdown
Owner

@poyrazK poyrazK commented Apr 19, 2026

Summary

  • Add SharedAcquireAbortedTxn — covers acquire_shared abort path (lines 37-39)
  • Add ExclusiveAcquireAbortedTxn — covers acquire_exclusive abort path (lines 90-92)
  • Add ExclusiveAcquireTimeout — covers timeout path (lines 105-108)
  • Add AlreadyExclusiveReturn — covers already-held exclusive return (line 73-75)
  • Add SharedAfterExclusiveSameRID — shared compat after exclusive
  • Add LockUpgrade — covers SHARED→EXCLUSIVE upgrade path (line 76)
  • Result: 100% branch coverage (116/116 branches)

Test plan

  • make lock_manager_tests && ./lock_manager_tests — 19 tests pass
  • Verified gcov branch coverage: 116/116

Add SharedAcquireAbortedTxn, ExclusiveAcquireAbortedTxn,
ExclusiveAcquireTimeout, AlreadyExclusiveReturn, SharedAfterExclusiveSameRID,
LockUpgrade tests covering previously untested abort/timeout/upgrade paths.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@poyrazK has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 22 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 22 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c2235c5-afc8-4d5b-aa42-bfc89ad99227

📥 Commits

Reviewing files that changed from the base of the PR and between d99d808 and 49992ce.

📒 Files selected for processing (1)
  • tests/lock_manager_tests.cpp
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/lock-manager-coverage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner Author

@poyrazK poyrazK left a comment

Choose a reason for hiding this comment

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

It's okay to merge

@poyrazK poyrazK merged commit fa7b25a into main Apr 19, 2026
9 checks passed
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