Verified Commit bc3567ce authored by Oliver Smith's avatar Oliver Smith
Browse files

test: increase timeouts for Alpine

Unfortunately, the tests take longer to complete in Alpine than in
Debian stretch. Maybe the python package is built with a different
speed/size trade-off in Debian?

Debian stretch:
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
...
================= 30 passed, 1 deselected in 72.10s (0:01:12) ==================

Alpine 3.12:
============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
...
================= 30 passed, 1 deselected in 485.24s (0:08:05) =================
parent 25543938
......@@ -2,7 +2,7 @@
addopts = --strict-markers
markers =
sourcehut
timeout = 3
timeout = 10
# Kill all threads on timeout
timeout_method = thread
......
......@@ -18,8 +18,8 @@ import bpo.repo
import bpo.repo.final
@pytest.mark.timeout(40)
def test_remove_deleted_package_SLOW_40s(monkeypatch):
@pytest.mark.timeout(120)
def test_remove_deleted_package_SLOW_120s(monkeypatch):
# Only one arch, so the bpo server doesn't attempt to run multiple repo
# indexing jobs at once.
branches = collections.OrderedDict()
......@@ -68,8 +68,8 @@ def test_remove_deleted_package_SLOW_40s(monkeypatch):
assert os.path.exists(final_path + "/APKINDEX.tar.gz")
@pytest.mark.timeout(40)
def test_depends_SLOW_40s(monkeypatch):
@pytest.mark.timeout(180)
def test_depends_SLOW_180s(monkeypatch):
""" Trigger the api push hook, then let bpo run the depends job.
Monkeypatch bpo.repo.build, so it stops after receiving depends
and does not try to build the repo. """
......@@ -85,8 +85,8 @@ def test_depends_SLOW_40s(monkeypatch):
bpo_test.trigger.push_hook_gitlab()
@pytest.mark.timeout(60)
def test_build_final_repo_with_two_pkgs_SLOW_60s(monkeypatch, tmpdir):
@pytest.mark.timeout(180)
def test_build_final_repo_with_two_pkgs_SLOW_180s(monkeypatch, tmpdir):
# Prepare job-callback/get-depends payload
payload_path = str(tmpdir) + "/payload.json"
v_hello = bpo_test.const.version_hello_world
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment