Skip to content

chore(test): catch a stale lock notice that drops the subscription's current lock - #63

Merged
yordis merged 1 commit into
yordis/fix-lock-loss-notice-when-busyfrom
yordis/test-stale-notice-ref
Oct 26, 2026
Merged

yordis merged 1 commit into
yordis/fix-lock-loss-notice-when-busyfrom
yordis/test-stale-notice-ref

Conversation

@yordis

@yordis yordis commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

@cursor

cursor Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only changes with no production or runtime behavior modifications.

Overview
Tightens the late lock notice scenario where a replaced advisory lock receives a stale lock_released for the old ref.

The test now waits until the subscription is :subscribed after reconnect and acquiring a new lock ref, then asserts it remains subscribed and that lock_ref(subscription) still equals the new ref after releasing the old lock—so a late notice cannot incorrectly clear the active lock. Event delivery assertions are unchanged.

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

@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: 915a86ce-dfb2-41ae-96fb-b49d366d030b
Commits

Reviewing files that changed from the base of the PR and between c4e92b8 and b9ea809.

Files selected for processing: 1
  • test/subscriptions/subscription_locking_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.

@yordis
yordis added this pull request to stack #73 October 26, 2026 16:00
@yordis
yordis force-pushed the yordis/test-stale-notice-ref branch from 7e9447d to 69fdd4c 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-stale-notice-ref branch from 69fdd4c to c2e8d2e 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-stale-notice-ref branch 2 times, most recently from 01c48e3 to 2f1c3bf Compare October 26, 2026 17:47
…ption's current lock

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/test-stale-notice-ref branch from 2f1c3bf to b9ea809 Compare October 26, 2026 19:31
@yordis yordis changed the title test(subscriptions): catch a stale lock notice that drops the subscription's current lock chore(test): catch a stale lock notice that drops the subscription's current lock Oct 26, 2026
@yordis
yordis merged commit 0802e7e into main Oct 26, 2026
9 of 11 checks passed
@yordis
yordis deleted the yordis/test-stale-notice-ref 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