summaryrefslogtreecommitdiff
path: root/tests/test_asyncio/test_cluster.py
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarshgupta137@gmail.com>2022-07-24 18:05:01 +0530
committerGitHub <noreply@github.com>2022-07-24 15:35:01 +0300
commitae171d16e173c367256b1da42f66947fd3c6d1ea (patch)
tree54af2cbdadfb397a102483ba0add5b432854d777 /tests/test_asyncio/test_cluster.py
parenta304953ed57c81a008a0217df375239a85ad7a04 (diff)
downloadredis-py-ae171d16e173c367256b1da42f66947fd3c6d1ea.tar.gz
async_cluster: fix concurrent pipeline (#2280)
- each pipeline should create separate stacks for each node
Diffstat (limited to 'tests/test_asyncio/test_cluster.py')
-rw-r--r--tests/test_asyncio/test_cluster.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_asyncio/test_cluster.py b/tests/test_asyncio/test_cluster.py
index f4ea5cd..0d0ea33 100644
--- a/tests/test_asyncio/test_cluster.py
+++ b/tests/test_asyncio/test_cluster.py
@@ -2476,3 +2476,11 @@ class TestClusterPipeline:
executed_on_replica = True
break
assert executed_on_replica
+
+ async def test_can_run_concurrent_pipelines(self, r: RedisCluster) -> None:
+ """Test that the pipeline can be used concurrently."""
+ await asyncio.gather(
+ *(self.test_redis_cluster_pipeline(r) for i in range(100)),
+ *(self.test_multi_key_operation_with_a_single_slot(r) for i in range(100)),
+ *(self.test_multi_key_operation_with_multi_slots(r) for i in range(100)),
+ )