Skip to content

Commit

Permalink
PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-congo committed Jun 27, 2024
1 parent 3b86450 commit 7e5d9d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/python/tests/test_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5565,7 +5565,7 @@ async def test_xack(
@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
async def test_xgroup_set_id(
self, redis_client: TRedisClient, cluster_mode, protocol, request
self, redis_client: TGlideClient, cluster_mode, protocol, request
):
key = f"{{testKey}}:{get_random_string(10)}"
non_existing_key = f"{{testKey}}:{get_random_string(10)}"
Expand Down Expand Up @@ -5616,10 +5616,11 @@ async def test_xgroup_set_id(
== OK
)

# XGROUP SETID accepts "0" for the entries read ID, but does not accept "0-0"
# the entries_read_id cannot be the first, last, or zero ID. Here we pass the first ID and assert that an
# error is raised.
with pytest.raises(RequestError):
await redis_client.xgroup_set_id(
key, group_name, stream_id1_1, entries_read_id="0-0"
key, group_name, stream_id1_1, entries_read_id=stream_id1_0
)

# xreadgroup should only return entry 1-2 since we reset the last delivered ID to 1-1
Expand Down

0 comments on commit 7e5d9d6

Please sign in to comment.