From 99ac36b35330a693db96dbb64ba212ef1f46572f Mon Sep 17 00:00:00 2001 From: Marcin Maliszkiewicz Date: Thu, 16 Apr 2026 15:14:24 +0200 Subject: [PATCH] test/cluster: add failure_detector_timeout fixture Add a shared pytest fixture that scales the failure detector timeout by build mode factor (e.g. 3x for debug/sanitize, 2x for dev). --- test/cluster/conftest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/cluster/conftest.py b/test/cluster/conftest.py index 7c0efc5407..6a800a8316 100644 --- a/test/cluster/conftest.py +++ b/test/cluster/conftest.py @@ -18,7 +18,7 @@ from concurrent.futures.thread import ThreadPoolExecutor from multiprocessing import Event from pathlib import Path from typing import TYPE_CHECKING -from test import TOP_SRC_DIR, path_to +from test import TOP_SRC_DIR, MODES_TIMEOUT_FACTOR, path_to from test.pylib.random_tables import RandomTables from test.pylib.util import unique_name from test.pylib.manager_client import ManagerClient @@ -393,3 +393,8 @@ async def key_provider(request, tmpdir, scylla_binary): """Encryption providers fixture""" async with make_key_provider_factory(request.param, tmpdir, scylla_binary) as res: yield res + + +@pytest.fixture(scope="function") +def failure_detector_timeout(build_mode): + return 2000 * MODES_TIMEOUT_FACTOR[build_mode]