-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add queue_class to REDIS_ALLOWED_KEYS (#2577)
* add queue_class to REDIS_ALLOWED_KEYS * fix lint * fix lint --------- Co-authored-by: zach.lee <[email protected]> Co-authored-by: dvora-h <[email protected]>
- Loading branch information
1 parent
c61eeb2
commit d63313b
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 @@ def test_connection_pool_class(self, connection_pool_class): | |
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://[email protected]: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: | ||
|