From cf243ccf370942b23180c0c632aec14dd999b538 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 4 Dec 2010 23:21:16 +0000 Subject: [PATCH] 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. --- tests/test_cancel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cancel.py b/tests/test_cancel.py index 52383f83..94daec14 100644 --- a/tests/test_cancel.py +++ b/tests/test_cancel.py @@ -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")