From: Daniele Varrazzo Date: Wed, 5 Jan 2022 20:52:55 +0000 (+0100) Subject: Skip tests using the deaf_port fixture on macOS and Windows X-Git-Tag: pool-3.1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a8214918df89f19dfd8544ff9db5e609d80f6f5;p=thirdparty%2Fpsycopg.git 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 --- 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)