[3.7] bpo-33353: test_asyncio uses smaller sendfile data (GH-7083) by miss-islington · Pull Request #7084 · python/cpython (original) (raw)

bpo-32622, bpo-33353: sendfile() tests of test_asyncio use socket
buffers of 1 kB "to test on relative small data sets". Send only
160 KiB rather 10 MB to make the test much faster.

Shrink also SendfileBase.DATA from 1600 KiB to 160 KiB.

On Linux, 3 test_sock_sendfile_mix_with_regular_send() runs now take
less than 1 second, instead of 18 seconds.

On FreeBSD, the 3 tests didn't hang, but took 3 minutes. Now
the 3 tests pass in less than 1 seconds.
(cherry picked from commit 2932755)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue33353