httpcore
httpcore copied to clipboard
Add a test showing that slow, overlapping requests back each other up in HTTP/2.
Summary
Quick proof of concept related to https://github.com/encode/httpx/discussions/3278 (and possibly https://github.com/encode/httpcore/discussions/778).
As committed:
$ pytest tests/*/test_http2.py
⋮
tests/_async/test_http2.py ....................F
tests/_sync/test_http2.py ..........F
⋮
> assert fetches == [1.0] * 5
E assert [1.4, 1.4, 1.2, 1.8, 1.0] == [1.0, 1.0, 1.0, 1.0, 1.0]
With my work in progress:
$ pytest tests/_sync/test_http2.py
⋮
tests/_sync/test_http2.py ...........
Checklist
- [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [ ] I've updated the documentation accordingly.