summaryrefslogtreecommitdiff
path: root/tests/test_asyncio/test_cluster.py
diff options
context:
space:
mode:
authorBar Shaul <88437685+barshaul@users.noreply.github.com>2022-06-23 14:34:08 +0300
committerGitHub <noreply@github.com>2022-06-23 14:34:08 +0300
commit6da80865be650344964e9497a9edcb68ff102ee8 (patch)
tree9fa3159f0575df6f854d272307b2f1e311212cf7 /tests/test_asyncio/test_cluster.py
parent23fd3273ba4dbee35585f53208dc044112dd391f (diff)
downloadredis-py-6da80865be650344964e9497a9edcb68ff102ee8.tar.gz
Reuse the old nodes' connections when a cluster topology refresh is being done (#2235)
* A fix was made to reuse the old nodes' connections when a cluster topology refresh is being done * Fixed RedisCluster to immediately raise AuthenticationError * Updated CHANGES * Fixed cluster async bgsave test to ignore "bgsave already in progress" error * Fixed linters
Diffstat (limited to 'tests/test_asyncio/test_cluster.py')
-rw-r--r--tests/test_asyncio/test_cluster.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_asyncio/test_cluster.py b/tests/test_asyncio/test_cluster.py
index e5ec026..f4ea5cd 100644
--- a/tests/test_asyncio/test_cluster.py
+++ b/tests/test_asyncio/test_cluster.py
@@ -1059,9 +1059,13 @@ class TestClusterRedisCommands:
@skip_if_redis_enterprise()
async def test_bgsave(self, r: RedisCluster) -> None:
- assert await r.bgsave()
- await asyncio.sleep(0.3)
- assert await r.bgsave(True)
+ try:
+ assert await r.bgsave()
+ await asyncio.sleep(0.3)
+ assert await r.bgsave(True)
+ except ResponseError as e:
+ if "Background save already in progress" not in e.__str__():
+ raise
async def test_info(self, r: RedisCluster) -> None:
# Map keys to same slot