summaryrefslogtreecommitdiff
path: root/tests/test_cluster.py
diff options
context:
space:
mode:
authorDongkeun Lee <3315213+zakaf@users.noreply.github.com>2023-03-16 22:05:28 +0900
committerGitHub <noreply@github.com>2023-03-16 15:05:28 +0200
commitd63313bf6080acaf18d61e072c78303adc0d4166 (patch)
treef5b5b61bbeda880a637f659c76eae29fd2a08e9b /tests/test_cluster.py
parentc61eeb2e3b5dff1f01eb1e665f424c7e75354f56 (diff)
downloadredis-py-d63313bf6080acaf18d61e072c78303adc0d4166.tar.gz
add queue_class to REDIS_ALLOWED_KEYS (#2577)
* add queue_class to REDIS_ALLOWED_KEYS * fix lint * fix lint --------- Co-authored-by: zach.lee <zach.lee@sendbird.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
Diffstat (limited to 'tests/test_cluster.py')
-rw-r--r--tests/test_cluster.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_cluster.py b/tests/test_cluster.py
index 1bf57a3..58f9b77 100644
--- a/tests/test_cluster.py
+++ b/tests/test_cluster.py
@@ -1,6 +1,7 @@
import binascii
import datetime
import warnings
+from queue import LifoQueue, Queue
from time import sleep
from unittest.mock import DEFAULT, Mock, call, patch
@@ -2511,6 +2512,18 @@ class TestNodesManager:
node.redis_connection.connection_pool, connection_pool_class
)
+ @pytest.mark.parametrize("queue_class", [Queue, LifoQueue])
+ def test_allow_custom_queue_class(self, queue_class):
+ rc = get_mocked_redis_client(
+ url="redis://my@DNS.com:7000",
+ cluster_slots=default_cluster_slots,
+ connection_pool_class=BlockingConnectionPool,
+ queue_class=queue_class,
+ )
+
+ for node in rc.nodes_manager.nodes_cache.values():
+ assert node.redis_connection.connection_pool.queue_class == queue_class
+
@pytest.mark.onlycluster
class TestClusterPubSubObject: