Shorter timeout in the async tests select

This commit is contained in:
Daniele Varrazzo 2019-03-06 01:43:06 +00:00
parent b5c7c93092
commit d61c902230

View File

@ -175,9 +175,9 @@ class ConnectingTestCase(unittest.TestCase):
if state == psycopg2.extensions.POLL_OK: if state == psycopg2.extensions.POLL_OK:
break break
elif state == psycopg2.extensions.POLL_READ: elif state == psycopg2.extensions.POLL_READ:
select.select([pollable], [], [], 10) select.select([pollable], [], [], 1)
elif state == psycopg2.extensions.POLL_WRITE: elif state == psycopg2.extensions.POLL_WRITE:
select.select([], [pollable], [], 10) select.select([], [pollable], [], 1)
else: else:
raise Exception("Unexpected result from poll: %r", state) raise Exception("Unexpected result from poll: %r", state)