From b910219d219c298539946ee963194c9b90a7e3d5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 29 Sep 2022 18:57:20 +0200 Subject: [PATCH] Increase HTTP timeout in tests on slow CI VMs --- cheroot/test/conftest.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cheroot/test/conftest.py b/cheroot/test/conftest.py index f7ecdc8122..fa94a4757e 100644 --- a/cheroot/test/conftest.py +++ b/cheroot/test/conftest.py @@ -12,6 +12,7 @@ import pytest +from .._compat import IS_MACOS, IS_WINDOWS from ..server import Gateway, HTTPServer from ..testing import ( # noqa: F401 # pylint: disable=unused-import native_server, wsgi_server, @@ -22,7 +23,15 @@ @pytest.fixture def http_request_timeout(): """Return a common HTTP request timeout for tests with queries.""" - return 0.1 + computed_timeout = 0.1 + + if IS_MACOS: + computed_timeout *= 2 + + if IS_WINDOWS: + computed_timeout *= 10 + + return computed_timeout @pytest.fixture