From 7cd4c3478f4dfabb6e06a52f02a9ca3cba06d063 Mon Sep 17 00:00:00 2001 From: Matthew Rocklin Date: Fri, 27 May 2022 09:34:44 -0500 Subject: [PATCH] Fix intermittent test_profile_plot failure (#6456) Fixes https://github.com/dask/distributed/issues/6454 --- distributed/dashboard/tests/test_components.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/distributed/dashboard/tests/test_components.py b/distributed/dashboard/tests/test_components.py index bc9f6c7484..f268c279b3 100644 --- a/distributed/dashboard/tests/test_components.py +++ b/distributed/dashboard/tests/test_components.py @@ -25,9 +25,9 @@ def test_basic(Component): async def test_profile_plot(c, s, a, b): p = ProfilePlot() assert not p.source.data["left"] - await c.gather(c.map(slowinc, range(10), delay=0.05)) - p.update(a.profile_recent) - assert len(p.source.data["left"]) >= 1 + while not len(p.source.data["left"]): + await c.submit(slowinc, 1, pure=False, delay=0.1) + p.update(a.profile_recent) @gen_cluster(client=True, clean_kwargs={"threads": False}) @@ -40,8 +40,8 @@ async def test_profile_time_plot(c, s, a, b): ap = ProfileTimePlot(a, doc=curdoc()) ap.trigger_update() - assert len(sp.source.data["left"]) <= 1 - assert len(ap.source.data["left"]) <= 1 + assert not len(sp.source.data["left"]) + assert not len(ap.source.data["left"]) await c.gather(c.map(slowinc, range(10), delay=0.05)) ap.trigger_update()