From 2a8214918df89f19dfd8544ff9db5e609d80f6f5 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 5 Jan 2022 21:52:55 +0100 Subject: [PATCH] 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 ba39786fc..01e384f50 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) -- 2.47.2