Fix test_worker_waits_for_scheduler#6155
Conversation
Remove asyncio.wait_for from test. It seems to be malfunctioning very rarely. We replace it with a less sophisticated task + sleep + cancel. Fixes dask#6153
fjetter
left a comment
There was a problem hiding this comment.
This has a lower level root cause since we're using asyncio.wait_for internally in a bunch of places, particularly the core.connect. The way asyncio.wait_for handles cancellation is subject to a race condition.
I'm fine with rewriting the test if that resolves things in this specific case
Is this python/cpython#86296 ? |
|
Or, more broadly, is there an issue somewhere for this? (doing a search on github for wait_for is less helpful than you might expect) |
|
Sorry, I meant to copy the link... #6064
This might be related but I need to read it a bit more thoroughly... |
|
Heh, this example is also a good case study in how you and I approach issues. I find a fix for the immedate pain in a few minutes, but ignore the deeper problem. You address the deeper problem, but things take a while. It's probably good that we're both here 🙂 |
Remove asyncio.wait_for from test.
It seems to be malfunctioning very rarely.
We replace it with a less sophisticated task + sleep + cancel.
Fixes #6153