Timeout the tests instead of just hanging indefinitely

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2024-01-15 17:33:27 +00:00 committed by Daniel Wozniak
parent 281bf59f3c
commit 287de2b898
2 changed files with 9 additions and 0 deletions

View file

@ -8,3 +8,5 @@ python_files=test_*.py
python_classes=Test*
python_functions = test_*
junit_family=xunit2
# Only the tests should count towards timeouts
timeout_func_only = true

View file

@ -16,6 +16,13 @@ import salt.utils.aws as aws
from tests.support.helpers import patched_environ
from tests.support.mock import MagicMock, patch
pytestmark = [
# Skip testing on windows since it does not support signals
# which is what the timeout marker is using.
pytest.mark.skip_on_windows,
pytest.mark.timeout(60, method="signal"),
]
@pytest.fixture(autouse=True)
def _cleanup():