From 37b685f47aa82be1153fdf34ea873f43af2fe4a4 Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Tue, 20 Dec 2022 12:56:12 +0300 Subject: [PATCH] Limit test execution time (#5484) This should protect us from unnoticed hangs, which happen sometimes and waste CI and developer time. Currently, the limit is 15s per test, which should be enough in normal conditions. --- tests/python/pytest.ini | 4 ++++ tests/python/requirements.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/tests/python/pytest.ini b/tests/python/pytest.ini index 6e7b9d6e..461f36c6 100644 --- a/tests/python/pytest.ini +++ b/tests/python/pytest.ini @@ -1,2 +1,6 @@ [pytest] +required_plugins = pytest-timeout addopts = --verbose --capture=tee-sys +# We expect no regular individual test to run too long +# can be overridden for specific tests with a test decorator +timeout = 15 diff --git a/tests/python/requirements.txt b/tests/python/requirements.txt index 41eb4a49..33c7d92f 100644 --- a/tests/python/requirements.txt +++ b/tests/python/requirements.txt @@ -1,4 +1,5 @@ pytest==6.2.5 +pytest-timeout==2.1.0 requests==2.26.0 deepdiff==5.6.0 boto3==1.17.61