Expected behaviour: the assertion should not raise, res for fake_client should be the same as res for real_client
It can be narrowed down in file fakeredis/commands_mixins/streams_mixin.py in method _xread:
...
for stream_name, start_id in stream_start_id_list:
item = CommandItem(stream_name, self._db, item=self._db.get(stream_name), default=None)
stream_results = self._xrange(item.value, start_id, max_inf, False, count)
if len(stream_results) > 0:
res.append([item.key, stream_results])
if first_pass and (count is None): ###
return res ### why the early exit ? there might be other items in list
...
Note: when removing block in fake_client.xread in the example above, it seems to work ❓ 🤔 (except that in real life the code really needs block)
Desktop (please complete the following information):
OS: ArchLinux
python version 3.11
redis-py version 5.0.1
fakeredis 2.23.1
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Describe the bug
When reading multiple streams, if
block
is setfakeredis
stops at the first stream whereas the real Redis gives output for all streams as expected.To Reproduce
Expected behavior
Expected behaviour: the assertion should not raise,
res
forfake_client
should be the same asres
forreal_client
It can be narrowed down in file
fakeredis/commands_mixins/streams_mixin.py
in method_xread
:Note: when removing
block
infake_client.xread
in the example above, it seems to work ❓ 🤔 (except that in real life the code really needsblock
)Desktop (please complete the following information):
Upvote & Fund