Skip to content

Commit

Permalink
Increase test timeout if debugger is running (#6218)
Browse files Browse the repository at this point in the history
This effectively disables the asyncio test timeout if a debugger is running.
  • Loading branch information
fjetter authored Apr 27, 2022
1 parent c186f22 commit 6fb095e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions distributed/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
except ImportError:
pass

from pytest_timeout import is_debugging

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -798,6 +799,8 @@ async def test_foo():
"timeout should always be set and it should be smaller than the global one from"
"pytest-timeout"
)
if is_debugging():
timeout = 3600

def _(func):
def test_func(*args, **kwargs):
Expand Down Expand Up @@ -956,6 +959,8 @@ async def test_foo(scheduler, worker1, worker2, pytest_fixture_a, pytest_fixture
"timeout should always be set and it should be smaller than the global one from"
"pytest-timeout"
)
if is_debugging():
timeout = 3600

scheduler_kwargs = merge(
{"dashboard": False, "dashboard_address": ":0"}, scheduler_kwargs
Expand Down

0 comments on commit 6fb095e

Please sign in to comment.