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.
This commit is contained in:
Jason Erickson 2014-05-12 16:09:15 -06:00 committed by Daniele Varrazzo
parent 97290955f6
commit c5f2e29dde

View File

@ -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)