summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKrzysztof Jagiello <me@kjagiello.com>2020-06-25 12:03:48 +0200
committerAsif Saif Uddin <auvipy@gmail.com>2020-07-01 21:31:40 +0600
commit016f4accb634ebc3eb8fc66741f23552e5966ea7 (patch)
tree402d17e6c3583c7d472f681e449f3848860d6fba /t
parent90a12a1ad6d00687d90e57d4888c203522e6e0cb (diff)
downloadkombu-016f4accb634ebc3eb8fc66741f23552e5966ea7.tar.gz
Add an SQS transport option for custom botocore config
Diffstat (limited to 't')
-rw-r--r--t/unit/transport/test_SQS.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/unit/transport/test_SQS.py b/t/unit/transport/test_SQS.py
index 307dadbc..09e2dc5d 100644
--- a/t/unit/transport/test_SQS.py
+++ b/t/unit/transport/test_SQS.py
@@ -275,6 +275,19 @@ class test_Channel:
# For cleanup purposes, delete the queue and the queue file
self.channel._delete(queue_name)
+ def test_botocore_config_override(self):
+ expected_connect_timeout = 5
+ client_config = {'connect_timeout': expected_connect_timeout}
+ self.connection = Connection(
+ transport=SQS.Transport,
+ transport_options={'client-config': client_config},
+ )
+ self.channel = self.connection.channel()
+ self.channel._sqs = None
+ boto3_sqs = SQS_Channel_sqs.__get__(self.channel, SQS.Channel)
+ botocore_config = boto3_sqs()._client_config
+ assert botocore_config.connect_timeout == expected_connect_timeout
+
def test_dont_create_duplicate_new_queue(self):
# All queue names start with "q", except "unittest_queue".
# which is definitely out of cache when get_all_queues returns the