Skip to content

chore(test): guard pending unlocks against verification retries that stop or multiply - #66

Merged
yordis merged 1 commit into
yordis/test-nil-connection-branchfrom
yordis/test-verify-sessions-timer
Oct 26, 2026
Merged

yordis merged 1 commit into
yordis/test-nil-connection-branchfrom
yordis/test-verify-sessions-timer

Conversation

@yordis

@yordis yordis commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ee7e211-06d2-4ffc-a6ff-e34e01aca32a
Commits

Reviewing files that changed from the base of the PR and between 8a13143 and 656fca0.

Files selected for processing: 1
  • test/advisory_locks_test.exs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@cursor

cursor Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only changes with no production code modified; low risk to runtime behavior.

Overview
Adds three disconnect-scenario tests in advisory_locks_test.exs that lock in retry behavior for pending unlocks and session verification.

One case asserts that after a lost session is reported, verification keeps rescheduling (verify_timer changes) while the DB session is stuck in a failed transaction, then the advisory lock becomes acquirable again after ROLLBACK. Another ensures repeated {:connected, _} events during failing verification do not replace or duplicate the single verify_timer. The third simulates a successful session check but a failing unlock (renamed subscriptions table), expects the release to park in released, and waits until the lock can be taken externally.

Together these document that verification must not stop after one failed probe and must not spawn parallel retry loops, and that unlock retries continue when the session answers but unlock SQL cannot complete.

Reviewed by Cursor Bugbot for commit 8505b63. Bugbot is set up for automated code reviews on this repo. Configure here.

@yordis
yordis added this pull request to stack #73 October 26, 2026 16:00
@yordis
yordis force-pushed the yordis/test-verify-sessions-timer branch from 8505b63 to ed19249 Compare October 26, 2026 16:16
@yordis
yordis removed this pull request from stack #73 October 26, 2026 16:53
@yordis
yordis force-pushed the yordis/test-verify-sessions-timer branch from ed19249 to 049d852 Compare October 26, 2026 16:54
@yordis
yordis added this pull request to stack #74 October 26, 2026 17:10
@yordis
yordis force-pushed the yordis/test-verify-sessions-timer branch 2 times, most recently from a599282 to d5392a7 Compare October 26, 2026 17:47
…ies that stop or multiply

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/test-verify-sessions-timer branch from d5392a7 to 656fca0 Compare October 26, 2026 19:31
@yordis yordis changed the title test(advisory-locks): guard pending unlocks against verification retries that stop or multiply chore(test): guard pending unlocks against verification retries that stop or multiply Oct 26, 2026
@yordis
yordis merged commit 26a554a into main Oct 26, 2026
7 of 8 checks passed
@yordis
yordis deleted the yordis/test-verify-sessions-timer branch October 26, 2026 22:05
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