From 14b396d174cde98c7cbbb21b8b9381cda679cb05 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Thu, 3 Jun 2021 16:29:32 -0500 Subject: For Windows compatibility, use multiprocessing timeouts instead of process signals with timeout_decorator --- tests/conftest.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/conftest.py') diff --git a/tests/conftest.py b/tests/conftest.py index c55c942..a3fb32d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -223,12 +223,8 @@ def fail_if_no_connection(func) -> bool: @wraps(func) def wrapper(*args, **kwargs): try: - timeout(1.0)(func)(*args, **kwargs) + timeout(1.0, use_signals=False)(func)(*args, **kwargs) except Exception as e: - # timeout_decorator is not Windows compatible, because it relies on process signals that - # don't exist in windows. This is an escape valve for that specific error. - if isinstance(e, AttributeError) and str(e) == "module 'signal' has no attribute 'SIGALRM'": - return logger.error(e) pytest.fail('Could not connect to backend') -- cgit v1.2.1