]> granicus.if.org Git - python/commit
[3.7] bpo-33353: Fix test_asyncio on FreeBSD (GH-7087)
authorVictor Stinner <vstinner@redhat.com>
Thu, 24 May 2018 01:21:14 +0000 (03:21 +0200)
committerGitHub <noreply@github.com>
Thu, 24 May 2018 01:21:14 +0000 (03:21 +0200)
commitfa24c1c5afa9ba2453d88db5ed6b9d2cc3b58384
tree7e46804e4746a9396c2e164dd811cfa64d74384e
parent72ef4fc32b354f8e56eec64f4c15ac2e07d118be
[3.7] bpo-33353: Fix test_asyncio on FreeBSD (GH-7087)

* bpo-33353: test_asyncio uses smaller sendfile data (#7083)

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 2932755cc11fd82b4908d60b24b837aa4f3028e6)

* bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)

bpo-32622, bpo-33353: On macOS, sock.connect() changes the
SO_SNDBUF value. Only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

(cherry picked from commit b97de3dd86046ac46567146d86a69d4f78ea09db)
Lib/test/test_asyncio/test_events.py