bpo-33353: test_asyncio uses smaller sendfile data by vstinner · Pull Request #7083 · 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 test didn't hang, but just was very very slow. Now
the 3 tests pass in less than 4 seconds.

https://bugs.python.org/issue33353