dask / dask/distributed

Flaky test test_as_completed_with_results_no_raise

Open
#4,512 0 comments 0 reactions 0 assignees View on GitHub
flaky test
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

```python
___________________ test_as_completed_with_results_no_raise ___________________

client =

def test_as_completed_with_results_no_raise(client):
x = client.submit(throws, 1)
y = client.submit(inc, 5)
z = client.submit(inc, 1)

ac = as_completed([x, y, z], with_results=True, raise_errors=False)
y.cancel()
res = list(ac)

dd = {r[0]: r[1:] for r in res}
assert dd.keys() == {x, y, z}
> assert x.status == "error"
E AssertionError: assert 'cancelled' == 'error'
E - error
E + cancelled
```
I'm consistently getting this at least on windows CI (linux and mac yet to be tested).
Cannot reproduce on local Linux.
It baffles me. The error does not seem to have anything to do with the as_completed function itself, and I cannot imagine how the x future can get cancelled on its own...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.