diff --git a/distributed/diagnostics/tests/test_progress.py b/distributed/diagnostics/tests/test_progress.py index eaab6d0354..5e9ad3269a 100644 --- a/distributed/diagnostics/tests/test_progress.py +++ b/distributed/diagnostics/tests/test_progress.py @@ -40,14 +40,17 @@ def h(*args): @nodebug -@pytest.mark.flaky(reruns=10, reruns_delay=5) @gen_cluster(client=True) async def test_many_Progress(c, s, a, b): x = c.submit(f, 1) y = c.submit(g, x) z = c.submit(h, y) - bars = [Progress(keys=[z], scheduler=s) for _ in range(10)] + # Give each bar a unique name; otherwise they all tokenize to the same + # plugin name and clobber each other in Scheduler.plugins. If z is still + # processing when setup() runs (e.g. on slow CI), the second bar's + # add_plugin() would then warn "overwriting", which is raised as an error. + bars = [Progress(keys=[z], scheduler=s, name=f"progress-{i}") for i in range(10)] await asyncio.gather(*(bar.setup() for bar in bars)) await z