psycopg.git / summary / log / commit / refs
commit 2a8214918df89f19dfd8544ff9db5e609d80f6f5
Author: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: Wed Jan 05 20:52:55 2022 +0000
Skip tests using the deaf_port fixture on macOS and Windows
They fail some 50% of the time, looks like the port is not really
listening, the fact that the function is called listen() is just a
practical joke.
https://github.com/psycopg/psycopg/runs/4719288041?check_suite_focus=true
tests/fix_proxy.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/fix_proxy.py b/tests/fix_proxy.py
index ba39786f..01e384f5 100644
--- a/tests/fix_proxy.py
+++ b/tests/fix_proxy.py
@@ -12,7 +12,11 @@ from psycopg import conninfo
def pytest_collection_modifyitems(items):
for item in items:
- if "proxy" in item.fixturenames:
+ # TODO: there is a race condition on macOS and Windows in the CI:
+ # listen returns before really listening and tests based on 'deaf_port'
+ # fail 50% of the times. Just add the 'proxy' mark on these tests
+ # because they are already skipped in the CI.
+ if "proxy" in item.fixturenames or "deaf_port" in item.fixturenames:
item.add_marker(pytest.mark.proxy)
[parent: f504ecfdb36d]