Don't consider the kernel not blocking us on write as an error.

This commit is contained in:
Daniele Varrazzo 2010-11-25 03:02:58 +00:00
parent 5a025825cc
commit 9f78141532
2 changed files with 12 additions and 2 deletions

View File

@ -328,7 +328,12 @@ class AsyncTests(unittest.TestCase):
if stub.polls.count(psycopg2.extensions.POLL_WRITE) > 1:
return
self.fail("sending a large query didn't trigger block on write.")
# This is more a testing glitch than an error: it happens
# on high load on linux: probably because the kernel has more
# buffers ready. A warning may be useful during development,
# but an error is bad during regression testing.
import warnings
warnings.warn("sending a large query didn't trigger block on write.")
def test_sync_poll(self):
cur = self.sync_conn.cursor()

View File

@ -50,7 +50,12 @@ class GreenTests(unittest.TestCase):
if stub.polls.count(psycopg2.extensions.POLL_WRITE) > 1:
return
self.fail("sending a large query didn't trigger block on write.")
# This is more a testing glitch than an error: it happens
# on high load on linux: probably because the kernel has more
# buffers ready. A warning may be useful during development,
# but an error is bad during regression testing.
import warnings
warnings.warn("sending a large query didn't trigger block on write.")
def test_error_in_callback(self):
conn = self.connect()