diff options
Diffstat (limited to 'tests/test_asyncio/test_cluster.py')
-rw-r--r-- | tests/test_asyncio/test_cluster.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_asyncio/test_cluster.py b/tests/test_asyncio/test_cluster.py index 0c676cb..e5ec026 100644 --- a/tests/test_asyncio/test_cluster.py +++ b/tests/test_asyncio/test_cluster.py @@ -680,13 +680,15 @@ class TestRedisClusterObj: else: raise e - async def test_can_run_concurrent_commands(self, r: RedisCluster) -> None: - assert await r.ping(target_nodes=RedisCluster.ALL_NODES) is True + async def test_can_run_concurrent_commands(self, request: FixtureRequest) -> None: + url = request.config.getoption("--redis-url") + rc = RedisCluster.from_url(url) assert all( await asyncio.gather( - *(r.ping(target_nodes=RedisCluster.ALL_NODES) for _ in range(100)) + *(rc.echo("i", target_nodes=RedisCluster.ALL_NODES) for i in range(100)) ) ) + await rc.close() @pytest.mark.onlycluster |