bpo-33353: test_asyncio use set_write_buffer_limits() by vstinner · Pull Request #7200 · python/cpython (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

vstinner

Use transport.set_write_buffer_limits() in sendfile tests of
test_asyncio to make sure that the protocol is paused after sending
1024 bytes. Previously,
test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed
on FreeBSD if the DATA was smaller than the default limit of 64 KiB.

https://bugs.python.org/issue33353

@vstinner

Use transport.set_write_buffer_limits() in sendfile tests of test_asyncio to make sure that the protocol is paused after sending 1024 bytes. Previously, test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed on FreeBSD if the DATA was smaller than the default limit of 64 KiB.

asvetlov

@vstinner

Crap, a test failed on AppVeyor:

FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_events.ProactorEventLoopTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_asyncio\test_events.py", line 2506, in test_sendfile_close_peer_in_the_middle_of_receiving
    self.file.tell())
AssertionError: False is not true : 65536

@vstinner

@vstinner

@vstinner

With "Fix sendfile tests on Windows, commit 3758248":

Timings:

Once, sendfile tests took longer than 1 min on Windows. I interrupted the tests to check that I was on the correct branch, but then I was unable to reproduce the slowdown... Another strange issue...

@vstinner vstinner deleted the asyncio_write_buflimit branch

May 29, 2018 14:02

@miss-islington

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 29, 2018

@vstinner @miss-islington

Use transport.set_write_buffer_limits() in sendfile tests of test_asyncio to make sure that the protocol is paused after sending 4 KiB. Previously, test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed on FreeBSD if the DATA was smaller than the default limit of 64 KiB. (cherry picked from commit 9551f77)

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

miss-islington added a commit that referenced this pull request

May 29, 2018

@miss-islington @vstinner

Use transport.set_write_buffer_limits() in sendfile tests of test_asyncio to make sure that the protocol is paused after sending 4 KiB. Previously, test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed on FreeBSD if the DATA was smaller than the default limit of 64 KiB. (cherry picked from commit 9551f77)

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