From 4f831abe2524064f823213ae9b94f2b02e162819 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 5 Oct 2021 12:18:26 -0400 Subject: [PATCH] Hipshot, try to avoid subs teardown race --- tests/test_task_broadcasting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_task_broadcasting.py b/tests/test_task_broadcasting.py index 8265197..f32d209 100644 --- a/tests/test_task_broadcasting.py +++ b/tests/test_task_broadcasting.py @@ -1,5 +1,6 @@ """ Broadcast channels for fan-out to local tasks. + """ from contextlib import asynccontextmanager from functools import partial @@ -332,6 +333,9 @@ def test_ensure_slow_consumers_lag_out( await trio.sleep(delay) if task.name == 'sub_1': + # trigger checkpoint to clean out other subs + await trio.sleep(0) + # the non-lagger got # a ``trio.EndOfChannel`` # because the ``tx`` below was closed