summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2019-08-06 10:59:38 -0700
committerAndy McCurdy <andy@andymccurdy.com>2019-08-06 10:59:38 -0700
commit038e5ee019ecaa29b073a89e61585d404579beff (patch)
tree60aa92db2980aa10d8f5019dff046d332c663daa /tests
parenta5ba696ed8aa3efbc709de4046a121a82a31392f (diff)
downloadredis-py-038e5ee019ecaa29b073a89e61585d404579beff.tar.gz
version 3.3.6, fixed a regression in 3.3.5 with pubsub timeouts3.3.6
Fixes #1200
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pubsub.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_pubsub.py b/tests/test_pubsub.py
index fee04da..2644d60 100644
--- a/tests/test_pubsub.py
+++ b/tests/test_pubsub.py
@@ -531,3 +531,11 @@ class TestPubSubConnectionKilled(object):
r.client_kill_filter(_id=client['id'])
with pytest.raises(ConnectionError):
wait_for_message(p)
+
+
+class TestPubSubTimeouts(object):
+ def test_get_message_with_timeout_returns_none(self, r):
+ p = r.pubsub()
+ p.subscribe('foo')
+ assert wait_for_message(p) == make_message('subscribe', 'foo', 1)
+ assert p.get_message(timeout=0.01) is None