Skip to content

Add bulk transfer test to check_one_way_stream #813

@njsmith

Description

@njsmith

It turns out that currently, check_one_way_stream never attempts to transfer more than 1 byte at a time. In fact, the do_receive_some helper takes a max_bytes parameter, but ignores it and calls receive_some(1) anyway (whoops).

(This was discovered while reviewing the subprocess support PR, see #791 (comment))

This is not so great, because in many stream implementations, bulk transfers involve different logic than single-byte transfers (due to filling up receive buffers, partial sends, etc.). check_one_way_stream should try sending a big chunk of data and making sure it gets through correctly.

There are individual versions of this test in test_*_pipes.py, and probably elsewhere too (maybe in the SocketStream tests). If these become redundant we can drop them to speed up the test suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions