From 2543728c2d2d21cb2790c08862b4d41ebed8169f Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 13 Jun 2023 11:34:55 +0200 Subject: [PATCH] Mark test_ctrl_c_handler as timing sensitive psycopg> =================================== FAILURES =================================== psycopg> _____________________________ test_ctrl_c_handler ______________________________ psycopg> t0 = time.time() psycopg> proc = sp.Popen([sys.executable, "-s", "-c", script], creationflags=creationflags) psycopg> proc.communicate() psycopg> t = time.time() - t0 psycopg> assert proc.returncode == 0 psycopg> > assert 1 < t < 2 psycopg> E assert 3.7456982135772705 < 2 psycopg> psycopg> tests/test_concurrency.py:293: AssertionError --- tests/test_concurrency.py | 1 + tests/test_concurrency_async.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index 7a5119c88..230007aeb 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -241,6 +241,7 @@ def test_identify_closure(conn_cls, dsn): @pytest.mark.skipif( sys.platform == "win32", reason="don't know how to Ctrl-C on Windows" ) +@pytest.mark.timing @pytest.mark.crdb_skip("cancel") def test_ctrl_c_handler(dsn): if sys.platform == "win32": diff --git a/tests/test_concurrency_async.py b/tests/test_concurrency_async.py index 80d3fc5cc..1be029798 100644 --- a/tests/test_concurrency_async.py +++ b/tests/test_concurrency_async.py @@ -192,6 +192,7 @@ async def test_identify_closure(aconn_cls, dsn): @pytest.mark.skipif( sys.platform == "win32", reason="don't know how to Ctrl-C on Windows" ) +@pytest.mark.timing @pytest.mark.crdb_skip("cancel") def test_ctrl_c_handler(dsn): script = f"""\ -- 2.47.2