From c5f26b61df0fd2ab6f6bf5aaccf4369250d3e8df Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Wed, 16 Sep 2026 15:21:52 -0600 Subject: [PATCH] test: Unflake the chunking test --- tests/test_chunking.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_chunking.py b/tests/test_chunking.py index 919e942b..b0af3669 100644 --- a/tests/test_chunking.py +++ b/tests/test_chunking.py @@ -220,7 +220,10 @@ async def test_with_perf_survives_chunking(js, monkeypatch): assert json.loads(_value(response))["n"] == _N_VALUES write_start, write_end, read_end = perf - assert write_start <= write_end <= read_end + assert write_start <= write_end + # The read loop takes read_end on a different thread, so read_end can + # precede write_end. We do the same thing in test_browser.py. + assert write_start <= read_end async def test_function_ending_in_a_comment(js, monkeypatch):