Skip to content

Commit

Permalink
Fixed test_client_kill test
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Sep 12, 2022
1 parent c3f1adc commit 02ce069
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_asyncio/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,8 +1351,9 @@ async def test_client_info(self, r: RedisCluster) -> None:
assert "addr" in info

@skip_if_server_version_lt("2.6.9")
async def test_client_kill(self, r: RedisCluster, r2: RedisCluster) -> None:
async def test_client_kill(self, r: RedisCluster, create_redis: Callable[..., RedisCluster]) -> None:
node = r.get_primaries()[0]
r2 = await create_redis(cls=RedisCluster, flushdb=False)
await r.client_setname("redis-py-c1", target_nodes="all")
await r2.client_setname("redis-py-c2", target_nodes="all")
clients = [
Expand All @@ -1373,6 +1374,7 @@ async def test_client_kill(self, r: RedisCluster, r2: RedisCluster) -> None:
]
assert len(clients) == 1
assert clients[0].get("name") == "redis-py-c1"
await r2.close()

@skip_if_server_version_lt("2.6.0")
async def test_cluster_bitop_not_empty_string(self, r: RedisCluster) -> None:
Expand Down

0 comments on commit 02ce069

Please sign in to comment.