diff options
author | Kristján Valur Jónsson <sweskman@gmail.com> | 2022-09-29 13:37:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 16:37:55 +0300 |
commit | b0883b791f95a595fae70bcedf3ad0f73c00e258 (patch) | |
tree | 6bfeb975aa6b9ec6325e90246230d01172beb1a6 /tests | |
parent | cdbc662adcd303d2525f3ace70531aa37a755652 (diff) | |
download | redis-py-b0883b791f95a595fae70bcedf3ad0f73c00e258.tar.gz |
Simplify async timeouts and allowing `timeout=None` in `PubSub.get_message()` to wait forever (#2295)v4.4.0rc2
* Avoid an extra "can_read" call and use timeout directly.
* Remove low-level read timeouts from the Parser, now handled in the Connection
* Allow pubsub.get_message(time=None) to block.
* update Changes
* increase test timeout for robustness
* expand with statement to avoid invoking null context managers.
remove nullcontext
* Remove unused import
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_asyncio/test_pubsub.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_asyncio/test_pubsub.py b/tests/test_asyncio/test_pubsub.py index 86584e4..6dedca9 100644 --- a/tests/test_asyncio/test_pubsub.py +++ b/tests/test_asyncio/test_pubsub.py @@ -29,7 +29,7 @@ def with_timeout(t): return wrapper -async def wait_for_message(pubsub, timeout=0.1, ignore_subscribe_messages=False): +async def wait_for_message(pubsub, timeout=0.2, ignore_subscribe_messages=False): now = asyncio.get_event_loop().time() timeout = now + timeout while now < timeout: |