]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: longer sleep to test for idle timeout exception
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 13 Oct 2025 12:49:59 +0000 (14:49 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 13 Oct 2025 12:51:35 +0000 (14:51 +0200)
The test fails semi-regularly on macOS (probably 5% of the times).

tests/test_connection.py
tests/test_connection_async.py

index 026800e93f3419f932480434a4e7992746d6105d..6b7ee93b80f471b0db84f6a7eacc83f84d1c40b8 100644 (file)
@@ -936,7 +936,7 @@ def test_right_exception_on_session_timeout(conn):
         want_ex = psycopg.OperationalError
 
     conn.execute("SET SESSION idle_in_transaction_session_timeout = 100")
-    sleep(0.2)
+    sleep(1)
     with pytest.raises(want_ex) as ex:
         conn.execute("SELECT * from pg_tables")
 
index fe85c00a807928b080b50ca11fa23b10312f3fc9..8e70947af41df30e9c591ecce98b418ea103a497 100644 (file)
@@ -941,7 +941,7 @@ async def test_right_exception_on_session_timeout(aconn):
         want_ex = psycopg.OperationalError
 
     await aconn.execute("SET SESSION idle_in_transaction_session_timeout = 100")
-    await asleep(0.2)
+    await asleep(1)
     with pytest.raises(want_ex) as ex:
         await aconn.execute("SELECT * from pg_tables")