GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.9] bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving (GH-30845) by miss-islington · Pull Request #30861 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Jan 24, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

(cherry picked from commit 1c705fd)

Co-authored-by: Kumar Aditya [email protected]

https://bugs.python.org/issue41682

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kumaraditya303 @miss-islington
fixed flaky test (pythonGH-30845)
dff8351
(cherry picked from commit 1c705fd)

Co-authored-by: Kumar Aditya <[email protected]>
@miss-islington
miss-islington requested review from 1st1 and asvetlov as code owners January 24, 2022 21:05
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jan 24, 2022
@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Jan 24, 2022
@bedevere-bot bedevere-bot mentioned this pull request Jan 24, 2022
bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving #30845
Merged
@bedevere-bot bedevere-bot added skip news awaiting review labels Jan 24, 2022
@miss-islington

miss-islington commented Jan 24, 2022

Copy link
Copy Markdown
Contributor Author

@kumaraditya303 and @pablogsal: Status check is done, and it's a failure ❌ .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner changed the title [3.9] fixed flaky test (GH-30845) [3.9] bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of_receiving (GH-30845) Jan 25, 2022
@miss-islington

miss-islington commented Jan 25, 2022

Copy link
Copy Markdown
Contributor Author

@kumaraditya303 and @pablogsal: Status check is done, and it's a success ✅ .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@miss-islington

miss-islington commented Jan 25, 2022

Copy link
Copy Markdown
Contributor Author

@kumaraditya303 and @pablogsal: Status check is done, and it's a success ✅ .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit f9ff0bf into python:3.9 Jan 25, 2022
@bedevere-bot bedevere-bot removed the awaiting review label Jan 25, 2022
@bedevere-bot

bedevere-bot commented Jan 25, 2022

Copy link
Copy Markdown

@vstinner: Please replace # with GH- in the commit message next time. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington
miss-islington deleted the backport-1c705fd-3.9 branch January 25, 2022 17:40
gvanrossum
gvanrossum reviewed Jan 25, 2022
View reviewed changes
Comment thread Lib/test/test_asyncio/test_sendfile.py
Comment on lines -90 to +96
# 128 KiB plus small unaligned to buffer chunk
DATA = b"SendfileBaseData" * (1024 * 8 + 1)

# 256 KiB plus small unaligned to buffer chunk
# Newer versions of Windows seems to have increased its internal
# buffer and tries to send as much of the data as it can as it
# has some form of buffering for this which is less than 256KiB
# on newer server versions and Windows 11.
# So DATA should be larger than 256 KiB to make this test reliable.
DATA = b"x" * (1024 * 256 + 1)

@gvanrossum gvanrossum Jan 25, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep coming back to this. I don't think it's worth changing anything (too much churn), but I would still like to point out that the original code had 16 bytes at the end of the 128 kb; the new code has only one extra byte after the 256 kb.

Also, this change affects almost all tests in this file, rather than just the one flaky test.

Finally, the use of "SendfileBaseData" as the dummy data seemed to be intentional to help debugging the test (e.g. test_sock_sendfile_mix_with_regular_send).

Just making sure you were aware of all these. :-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Jan 25, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't read the original PR. I only helped to backport the change because IMO it's better to run a test than skipping it in 3.9 and 3.10 branch.

@kumaraditya303: Do you want to write a PR to make changes suggested by @gvanrossum?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
@miss-islington @kumaraditya303 @hello-adam
bpo-41682: fixed flaky test test_sendfile_close_peer_in_the_middle_of…
6d939cb
…_receiving (pythonGH-30845) (python#30861)

(cherry picked from commit 1c705fd)

Co-authored-by: Kumar Aditya <[email protected]>

Co-authored-by: Kumar Aditya <[email protected]>
@aeros aeros mentioned this pull request Oct 3, 2023
[Windows] : Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure #85848
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner left review comments
@gvanrossum gvanrossum gvanrossum left review comments
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@miss-islington @bedevere-bot @vstinner @gvanrossum @the-knights-who-say-ni @kumaraditya303
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.