]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Mark test_ctrl_c_handler as timing sensitive
authorSandro <sandro.jaeckel@gmail.com>
Tue, 13 Jun 2023 09:34:55 +0000 (11:34 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 13 Jun 2023 16:04:42 +0000 (18:04 +0200)
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
tests/test_concurrency_async.py

index 7a5119c88f0389c82243c129ceda860e73964a54..230007aeb756c848a7791e2d13d2d27cc65bc952 100644 (file)
@@ -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":
index 80d3fc5cc347cff465ca5a6b866a416edd7e56ab..1be029798273fb3d1ea0b055c92332d38d007bfe 100644 (file)
@@ -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"""\