MCPcopy
hub / github.com/redis/redis-py / test_xgroup_createconsumer

Method test_xgroup_createconsumer

tests/test_commands.py:6644–6657  ·  view source on GitHub ↗
(self, r)

Source from the content-addressed store, hash-verified

6642
6643 @skip_if_server_version_lt("6.2.0")
6644 def test_xgroup_createconsumer(self, r):
6645 stream = "stream"
6646 group = "group"
6647 consumer = "consumer"
6648 r.xadd(stream, {"foo": "bar"})
6649 r.xadd(stream, {"foo": "bar"})
6650 r.xgroup_create(stream, group, 0)
6651 assert r.xgroup_createconsumer(stream, group, consumer) == 1
6652
6653 # read all messages from the group
6654 r.xreadgroup(group, consumer, streams={stream: ">"})
6655
6656 # deleting the consumer should return 2 pending messages
6657 assert r.xgroup_delconsumer(stream, group, consumer) == 2
6658
6659 @skip_if_server_version_lt("5.0.0")
6660 def test_xgroup_destroy(self, r):

Callers

nothing calls this directly

Calls 5

xaddMethod · 0.80
xgroup_createMethod · 0.80
xgroup_createconsumerMethod · 0.80
xreadgroupMethod · 0.80
xgroup_delconsumerMethod · 0.80

Tested by

no test coverage detected