mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Shorter "never ending query" to test query canceling.
If the cancel signal misses the race, this query will stay in the backend until the sleep expires.
This commit is contained in:
parent
13c2f5a78b
commit
cf243ccf37
|
@ -35,7 +35,7 @@ class CancelTests(unittest.TestCase):
|
|||
cur = conn.cursor()
|
||||
try:
|
||||
self.assertRaises(psycopg2.extensions.QueryCanceledError,
|
||||
cur.execute, "select pg_sleep(10000)")
|
||||
cur.execute, "select pg_sleep(60)")
|
||||
# make sure the connection still works
|
||||
conn.rollback()
|
||||
cur.execute("select 1")
|
||||
|
|
Loading…
Reference in New Issue
Block a user