Conversation
|
|
||
| try: | ||
| c = await default_client() | ||
| c = default_client() |
There was a problem hiding this comment.
you pretty much never need to await the default client, because it's already started
| with dask.config.set({"distributed.comm.timeouts.connect": "10s"}): | ||
| assert await asyncio.gather( | ||
| run_client(), | ||
| run_scheduler_after_2_seconds(), |
There was a problem hiding this comment.
quite a big refactor of this test case because of the client_start_fut = asyncio.ensure_future(c)
|
watch out for https://github.com/dask/distributed/pull/6921/files#diff-ac7114557c3edd1c8da09cede9fe1b66ce38d324dd72258525b743030a2a411d github folds it because there's too many changes |
| async def async_fn(): | ||
| result = None | ||
| with dask.config.set(config): | ||
| async with _cluster_factory() as (s, workers), _client_factory( |
There was a problem hiding this comment.
also sorry about adding more difficult to review indentation changes to gen_cluster, but hopefully this is the last one as we can add more stuff to the async with _cluster_factory() as (s, workers), _client_factory( expression
distributed/tests/test_utils_test.py
Outdated
|
|
||
|
|
||
| def test_lingering_client_2(loop): | ||
| # assert where the client went |
There was a problem hiding this comment.
| # assert where the client went | |
| # TODO: assert where the client went |
distributed/tests/test_worker.py
Outdated
| # TODO: `await get_client()` raises a deprecation warning to use | ||
| # `async with get_client()` and that will kill the workers' client | ||
| # if you do that. We really don't want users to do that. |
There was a problem hiding this comment.
this isn't true anymore - but we still don't want to await get_client()
| # TODO: `await get_client()` raises a deprecation warning to use | |
| # `async with get_client()` and that will kill the workers' client | |
| # if you do that. We really don't want users to do that. | |
| # TODO: the existence of `await get_client()` implies the possibility | |
| # of `async with get_client()` and that will kill the workers' client | |
| # if you do that. We really don't want users to do that. | |
| # https://github.com/dask/distributed/pull/6921/ |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files ± 0 15 suites ±0 6h 29m 42s ⏱️ + 6m 50s For more details on these failures, see this check. Results for commit a10d2b7. ± Comparison against base commit a1d2011. |
This is just the refactors extracted from #6836
This should make it easier to do optimizations like #6920 so when a failure happens we can propagate it quickly and close the Client
pre-commit run --all-files