From c5f2e29dde8bc18f27f2f221ca684b07477cdeb4 Mon Sep 17 00:00:00 2001 From: Jason Erickson Date: Mon, 12 May 2014 16:09:15 -0600 Subject: [PATCH] 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. --- tests/test_async.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_async.py b/tests/test_async.py index 981b49fe..d40b9c3e 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)