Skip to content

test_map flaky #5007

@gjoseph92

Description

@gjoseph92

On macOS, 3.9: https://github.com/dask/distributed/runs/2947008056#step:10:2261

=================================== FAILURES ===================================
___________________________________ test_map ___________________________________

client = <Client: 'tcp://127.0.0.1:61717' processes=2 threads=2, memory=28.00 GiB>

    def test_map(client):
        with client.get_executor() as e:
            N = 10
            it = e.map(inc, range(N))
            expected = set(range(1, N + 1))
            for x in it:
                expected.remove(x)
            assert not expected
    
        with client.get_executor(pure=False) as e:
            N = 10
            it = e.map(slowinc, range(N), [0.1] * N, timeout=0.4)
            results = []
            with pytest.raises(TimeoutError):
                for x in it:
                    results.append(x)
>           assert 2 <= len(results) < 7
E           assert 2 <= 1
E            +  where 1 = len([1])

distributed/tests/test_client_executor.py:155: AssertionError

I assume the issue here is that CI was somehow slow enough that not enough 0.1sec tasks were able to run in the 0.4sec timeout.

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