summaryrefslogtreecommitdiff
path: root/tests/test_async.py
diff options
context:
space:
mode:
authorJason Erickson <jerickso@stickpeople.com>2014-05-12 16:09:15 -0600
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-05-19 12:15:52 +0100
commitc5f2e29dde8bc18f27f2f221ca684b07477cdeb4 (patch)
treef89d936eb583a3258f74cb9580b06fae391aa8e4 /tests/test_async.py
parent97290955f6644576634c5d76caf071031b420b5e (diff)
downloadpsycopg2-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-xtests/test_async.py4
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)