summaryrefslogtreecommitdiff
path: root/tests/test_cluster.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cluster.py')
-rw-r--r--tests/test_cluster.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_cluster.py b/tests/test_cluster.py
index 55b660c..da6a8e4 100644
--- a/tests/test_cluster.py
+++ b/tests/test_cluster.py
@@ -18,7 +18,7 @@ from redis.cluster import (
get_node_name,
)
from redis.commands import CommandsParser
-from redis.connection import Connection
+from redis.connection import BlockingConnectionPool, Connection, ConnectionPool
from redis.crc import key_slot
from redis.exceptions import (
AskError,
@@ -2496,6 +2496,21 @@ class TestNodesManager:
else:
assert startup_nodes == ["my@DNS.com:7000"]
+ @pytest.mark.parametrize(
+ "connection_pool_class", [ConnectionPool, BlockingConnectionPool]
+ )
+ def test_connection_pool_class(self, connection_pool_class):
+ rc = get_mocked_redis_client(
+ url="redis://my@DNS.com:7000",
+ cluster_slots=default_cluster_slots,
+ connection_pool_class=connection_pool_class,
+ )
+
+ for node in rc.nodes_manager.nodes_cache.values():
+ assert isinstance(
+ node.redis_connection.connection_pool, connection_pool_class
+ )
+
@pytest.mark.onlycluster
class TestClusterPubSubObject: