(self, r)
| 6624 | |
| 6625 | @skip_if_server_version_lt("5.0.0") |
| 6626 | def test_xgroup_delconsumer(self, r): |
| 6627 | stream = "stream" |
| 6628 | group = "group" |
| 6629 | consumer = "consumer" |
| 6630 | r.xadd(stream, {"foo": "bar"}) |
| 6631 | r.xadd(stream, {"foo": "bar"}) |
| 6632 | r.xgroup_create(stream, group, 0) |
| 6633 | |
| 6634 | # a consumer that hasn't yet read any messages doesn't do anything |
| 6635 | assert r.xgroup_delconsumer(stream, group, consumer) == 0 |
| 6636 | |
| 6637 | # read all messages from the group |
| 6638 | r.xreadgroup(group, consumer, streams={stream: ">"}) |
| 6639 | |
| 6640 | # deleting the consumer should return 2 pending messages |
| 6641 | assert r.xgroup_delconsumer(stream, group, consumer) == 2 |
| 6642 | |
| 6643 | @skip_if_server_version_lt("6.2.0") |
| 6644 | def test_xgroup_createconsumer(self, r): |
nothing calls this directly
no test coverage detected