From 75508cc70c4ff33c2032765d65da26d76b8aabff Mon Sep 17 00:00:00 2001 From: anurindm Date: Wed, 23 Oct 2024 13:58:40 +0300 Subject: [PATCH] Added nearest node count calculation for choosing ec policy Signed-off-by: Dmitry Anurin --- pytest_tests/testsuites/replication/test_ec_replication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytest_tests/testsuites/replication/test_ec_replication.py b/pytest_tests/testsuites/replication/test_ec_replication.py index 8e243a8d..21ce932e 100644 --- a/pytest_tests/testsuites/replication/test_ec_replication.py +++ b/pytest_tests/testsuites/replication/test_ec_replication.py @@ -39,7 +39,8 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: 100: ["EC 12.4", "EC 8.4", "EC 5.3", "EC 4.4"], } - metafunc.parametrize("ec_policy, node_count", ((ec_policy, node_count) for ec_policy in ec_map[node_count])) + nearest_node_count = ([4] + (list(filter(lambda x: x <= node_count, ec_map.keys()))))[-1] + metafunc.parametrize("ec_policy, node_count", ((ec_policy, node_count) for ec_policy in ec_map[nearest_node_count])) @allure.title("Initialized remote FrostfsAdm")