Skip to content

Improve Phoenix PubSub subscribe retries#191

Merged
tompave merged 4 commits intomasterfrom
subscribe_behaviour
Feb 23, 2025
Merged

Improve Phoenix PubSub subscribe retries#191
tompave merged 4 commits intomasterfrom
subscribe_behaviour

Conversation

@tompave
Copy link
Owner

@tompave tompave commented Feb 22, 2025

With Elixir 1.18, the Phoenix PubSub tests had become very flaky locally. This was because the tests where running before the change notifications GenServer could fully subscribe to the notifications topic.

This PR fixes that with a new system to track the subscription status, plus new test helpers to assert with retries, rather than waiting for a timer.

…fications module has successfully subscribed to the notifications topic.
…ore some operations, rather than sleeping. Also add a helper to assert with retries.
@tompave tompave force-pushed the subscribe_behaviour branch from c77c54b to e6d06bd Compare February 23, 2025 09:30
@tompave tompave merged commit de79316 into master Feb 23, 2025
10 checks passed
@tompave tompave deleted the subscribe_behaviour branch February 23, 2025 22:01
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