Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): Execute SSUBSCRIBE command directly in client #4763

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

mkaruza
Copy link
Contributor

@mkaruza mkaruza commented Mar 14, 2025

It could be that pubsub.ssubscribe function is async and doesn't wait
for any response from server so execute command in client directly

@mkaruza mkaruza requested a review from kostasrim March 14, 2025 05:21

Verified

This commit was signed with the committer’s verified signature.
It could be that `pubsub.ssubscribe` function is async and doesn't wait
for any response from server so execute command in client directly.

Signed-off-by: mkaruza <mario@dragonflydb.io>
@mkaruza mkaruza force-pushed the mkaruza/sleep-in-cluster-pubsub_shard_command-test branch from 67ae44c to b929cb0 Compare March 14, 2025 11:06
@mkaruza mkaruza changed the title fix: Sleep after subscribed to channels fix(test): Execute SSUBSCRIBE command directly in client Mar 14, 2025
Copy link
Contributor

@kostasrim kostasrim left a comment

Choose a reason for hiding this comment

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

LGTM 👨‍🍳

# We are executing SSUBSCRIBE commands and wait for them to be sure that
# channels are created
message = await c_nodes[0].execute_command("SSUBSCRIBE pubsub-shard-channel")
message = await c_nodes[0].execute_command("SSUBSCRIBE shard-channel")
Copy link
Contributor

Choose a reason for hiding this comment

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

When I get a chance I will check why consumer.ssubscribe is async (it might be a bug on redis-py worth reporting)

@mkaruza mkaruza merged commit 5facf12 into main Mar 14, 2025
10 checks passed
@mkaruza mkaruza deleted the mkaruza/sleep-in-cluster-pubsub_shard_command-test branch March 14, 2025 15: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.

None yet

2 participants