Skip to content

Flaky test test_as_completed_with_results_no_raise #4512

@crusaderky

Description

@crusaderky
___________________ test_as_completed_with_results_no_raise ___________________

client = <Client: 'tcp://127.0.0.1:56432' processes=2 threads=2, memory=15.03 GB>

    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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky testIntermittent failures on CI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions