Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ def drain() -> None:
time.sleep(0.01)
assert not lends
if pauses:
# The child can exit before the consumer has read all of its first page, so give it time.
deadline = time.monotonic() + 5
while len(received) < first_read and time.monotonic() < deadline:
time.sleep(0.01)
assert len(received) == first_read
# cmd2's own writes follow what the child wrote, which is still pending.
threading.Timer(0.3, resume.set).start()
Expand Down
Loading