Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application unittests using utils_test.cluster() timeout on Windows #2438

Open
mpeleshenko opened this issue Dec 24, 2018 · 1 comment
Open

Comments

@mpeleshenko
Copy link

My application's distiributed unittests always seem to fail on Windows due to the timeout set in the below line. They work fine on Linux. I tried changing it to 15s on Windows and it worked fine. Can this timeout be increased or made configurable for cases where it takes longer to create a worker process?

worker['address'] = worker['queue'].get(timeout=5)

Code:

scheduler_kwargs = {
    'preload': (<path to module>,),
    'preload_argv': (<arg for dask_setup>,),
}
worker_kwargs = {
    'preload': (<path to module>,),
    'preload_argv': (<arg for dask_setup>,),
    'ncores': 1,
    'memory_limit': 70000000000,
}
with distributed.utils_test.cluster(nworkers=1, nanny=True, worker_kwargs=worker_kwargs, scheduler_kwargs=scheduler_kwargs) as (s, ws):
    <run something on cluster>

Exception:

Traceback (most recent call last):
  File "<conda env>\lib\site-packages\distributed\utils_test.py", line 653, in cluster
    worker['address'] = worker['queue'].get(timeout=5)
  File "<conda env>\lib\multiprocessing\queues.py", line 105, in get
    raise Empty
queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
...
  File "<conda env>\lib\contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "<conda env>\lib\site-packages\distributed\utils_test.py", line 655, in cluster
    raise pytest.xfail.Exception("Worker failed to start in test")
_pytest.outcomes.XFailed: Worker failed to start in test

Python 3.5.6
distributed 1.25.1

@mrocklin
Copy link
Member

mrocklin commented Jan 4, 2019

Yes, the timeout could be increased. I'd be happy to merge a PR with this change. (sorry for the late response)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants