Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bulk transfer test to check_one_way_stream #813

Open
njsmith opened this issue Dec 22, 2018 · 0 comments
Open

Add bulk transfer test to check_one_way_stream #813

njsmith opened this issue Dec 22, 2018 · 0 comments
Labels

Comments

@njsmith
Copy link
Member

njsmith commented Dec 22, 2018

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.

@njsmith njsmith added the polish label Dec 22, 2018
@njsmith njsmith mentioned this issue Dec 22, 2018
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant