summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn T. Myers <9696606+johntmyers@users.noreply.github.com>2019-01-10 09:10:34 -0600
committerJohn T. Myers <9696606+johntmyers@users.noreply.github.com>2019-01-10 09:10:34 -0600
commite6e52ee50cfc8234fb6775122b2149c7b3a002d6 (patch)
treef1fb26bb6837d0dc9312018d280b72214653b808 /tests
parenta3cfded93afa2a65908f05ac251b18d77fa84dd2 (diff)
downloadredis-py-e6e52ee50cfc8234fb6775122b2149c7b3a002d6.tar.gz
Added noack option for XREADGROUP
Diffstat (limited to 'tests')
-rw-r--r--tests/test_commands.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 566437d..60f3e51 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -2205,6 +2205,16 @@ class TestRedisCommands(object):
# xread starting after the last message returns an empty message list
assert r.xreadgroup(group, consumer, streams={stream: '>'}) == expected
+ r.xgroup_destroy(stream, group)
+
+ # xreadgroup with noack does not have any items in the PEL
+ r.xgroup_create(stream, group, '0')
+ assert len(r.xreadgroup(group, consumer, streams={stream: '>'},
+ noack=True)[0][1]) == 2
+ # now there should be nothing pending
+ assert len(r.xreadgroup(group, consumer,
+ streams={stream: '0'})[0][1]) == 0
+
@skip_if_server_version_lt('5.0.0')
def test_xrevrange(self, r):
stream = 'stream'