diff options
author | Jason Erickson <jerickso@stickpeople.com> | 2014-05-12 16:09:15 -0600 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-05-19 12:15:52 +0100 |
commit | c5f2e29dde8bc18f27f2f221ca684b07477cdeb4 (patch) | |
tree | f89d936eb583a3258f74cb9580b06fae391aa8e4 /tests/test_async.py | |
parent | 97290955f6644576634c5d76caf071031b420b5e (diff) | |
download | psycopg2-c5f2e29dde8bc18f27f2f221ca684b07477cdeb4.tar.gz |
Added select.select timeout on AsyncTests.wait
On Windows, the select.select() hangs/waits forever on the
test_async_connection_error_message() test. Adding a 10 second timeout
allows the tests to continue.
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-x | tests/test_async.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_async.py b/tests/test_async.py index 981b49f..d40b9c3 100755 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -75,9 +75,9 @@ class AsyncTests(ConnectingTestCase): if state == psycopg2.extensions.POLL_OK: break elif state == psycopg2.extensions.POLL_READ: - select.select([pollable], [], []) + select.select([pollable], [], [], 10) elif state == psycopg2.extensions.POLL_WRITE: - select.select([], [pollable], []) + select.select([], [pollable], [], 10) else: raise Exception("Unexpected result from poll: %r", state) |