Add bulk transfer test to check_one_way_stream
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- testing-qa
Research direction
Find the check_one_way_stream and do_receive_some helpers, then compare them with the individual bulk-transfer tests in test_*_pipes.py and any SocketStream tests. Verify how max_bytes is used and add coverage showing that a large chunk transfers correctly. The work is done when the shared check catches bulk-transfer problems and redundant tests are identified for possible removal.
Written by the indexing model from the issue text.
Description
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 https://github.com/python-trio/trio/pull/791#issuecomment-449480426)
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.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 432
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python-trio/trio
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
python-trio/trio#3466 · 2 comments ·
-
docs
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
python-trio/trio#3379 · 2 comments ·
-
docs
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
python-trio/trio#3300 · 9 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
python-trio/trio#3165 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
python-trio/trio#3513 · 7 comments ·
All issues in python-trio/trio
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·