mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
Slower timeout for a test that sometimes fail
At least it should fail with an error after 2 seconds, not waiting for Travis timeout of 10 minutes.
This commit is contained in:
parent
30a833f57a
commit
c6af16c3ae
|
@ -92,7 +92,7 @@ class CancelTests(ConnectingTestCase):
|
||||||
self.assertRaises(psycopg2.OperationalError, async_conn.cancel)
|
self.assertRaises(psycopg2.OperationalError, async_conn.cancel)
|
||||||
extras.wait_select(async_conn)
|
extras.wait_select(async_conn)
|
||||||
cur = async_conn.cursor()
|
cur = async_conn.cursor()
|
||||||
cur.execute("select pg_sleep(10000)")
|
cur.execute("select pg_sleep(2)")
|
||||||
self.assertTrue(async_conn.isexecuting())
|
self.assertTrue(async_conn.isexecuting())
|
||||||
async_conn.cancel()
|
async_conn.cancel()
|
||||||
self.assertRaises(psycopg2.extensions.QueryCanceledError,
|
self.assertRaises(psycopg2.extensions.QueryCanceledError,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user