-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add the getdel command available from redis 6.2.0 #1460
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
Changes from all commits
99e3059
79fd5df
55be644
0b1cb3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
FROM redis:6.0.9-buster | ||
FROM redis:6.2-buster |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -474,7 +474,7 @@ class TestPubSubSubcommands: | |
def test_pubsub_channels(self, r): | ||
p = r.pubsub() | ||
p.subscribe('foo', 'bar', 'baz', 'quux') | ||
for i in range(4): | ||
for _ in range(4): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! But personally speaking, I don't prefer irrelevant changes being included in this PR. What do you think @andymccurdy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am very new contributing in open source project. So please forgive my silly question. Are you saying here that resolving this Pylint warning should not be done in this PR because it is not its main focus? I would have thought we should use every opportunity to reduce the technical debt, especially if it is clear that it will not break anything. |
||
assert wait_for_message(p)['type'] == 'subscribe' | ||
expected = [b'bar', b'baz', b'foo', b'quux'] | ||
assert all([channel in r.pubsub_channels() for channel in expected]) | ||
|
@@ -483,11 +483,11 @@ def test_pubsub_channels(self, r): | |
def test_pubsub_numsub(self, r): | ||
p1 = r.pubsub() | ||
p1.subscribe('foo', 'bar', 'baz') | ||
for i in range(3): | ||
for _ in range(3): | ||
assert wait_for_message(p1)['type'] == 'subscribe' | ||
p2 = r.pubsub() | ||
p2.subscribe('bar', 'baz') | ||
for i in range(2): | ||
for _ in range(2): | ||
assert wait_for_message(p2)['type'] == 'subscribe' | ||
p3 = r.pubsub() | ||
p3.subscribe('baz') | ||
|
@@ -500,7 +500,7 @@ def test_pubsub_numsub(self, r): | |
def test_pubsub_numpat(self, r): | ||
p = r.pubsub() | ||
p.psubscribe('*oo', '*ar', 'b*z') | ||
for i in range(3): | ||
for _ in range(3): | ||
assert wait_for_message(p)['type'] == 'psubscribe' | ||
assert r.pubsub_numpat() == 3 | ||
|
||
|
@@ -564,6 +564,6 @@ def exception_handler(ex, pubsub, thread): | |
exception_handler=exception_handler | ||
) | ||
|
||
assert event.wait(timeout=1.0) | ||
assert event.wait(timeout=10.0) | ||
pubsub_thread.join(timeout=1.0) | ||
assert not pubsub_thread.is_alive() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct.
REDIS_6_VERSION
actually means "Since which version Redis6 feature introduced". Please check the following usage.@skip_if_server_version_lt(REDIS_6_VERSION)
So you cannot change it to
6.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this is a poor work around. The issue is that I do not understand why the tests are failing with Redis 6.2. All I want here is to add the getdel verb that is now available in Redis. I would appreciate a lot some help to resolve the Unit Test issues of that PR. If not I will cancel it and wait for somebody else to add getdel in another PR.