Skip to content

Commit 4159eaf

Browse files
authored
test: Unflake the chunking test (#311)
1 parent c55517b commit 4159eaf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_chunking.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ async def test_with_perf_survives_chunking(js, monkeypatch):
220220

221221
assert json.loads(_value(response))["n"] == _N_VALUES
222222
write_start, write_end, read_end = perf
223-
assert write_start <= write_end <= read_end
223+
assert write_start <= write_end
224+
# The read loop takes read_end on a different thread, so read_end can
225+
# precede write_end. We do the same thing in test_browser.py.
226+
assert write_start <= read_end
224227

225228

226229
async def test_function_ending_in_a_comment(js, monkeypatch):

0 commit comments

Comments
 (0)