Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-109594: Fix concurrent.futures test_timeout()#110018

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:cf_fix_test_timeout
Sep 28, 2023

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commentedSep 28, 2023
edited by bedevere-appbot
Loading

Fix test_timeout() of test_concurrent_futures.test_wait. Remove the future which may or may not complete depending if it takes longer than the timeout ot not. Keep the second future which does not complete before wait(). Make also the test faster: 0.5 second instead of 6 seconds, so remove @support.requires_resource('walltime') decorator.

Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.
@vstinner
Copy link
MemberAuthor

@serhiy-storchaka: One less@support.requires_resource('walltime') decorator :-)

cc@pitrou

@vstinner
Copy link
MemberAuthor

I stress-tested test_timeout() on Linux with the following command. I interrupted it after 5 minutes and 958 successful runs.

vstinner@mona$ ./python -m test -v test_concurrent_futures.test_wait -m test_timeout -u all -j20 --forever(...)0:05:14 load avg: 18.51 [958] test_concurrent_futures.test_wait passedtest_timeout (test.test_concurrent_futures.test_wait.ProcessPoolForkWaitTest.test_timeout) ... 0.54s oktest_timeout (test.test_concurrent_futures.test_wait.ProcessPoolForkserverWaitTest.test_timeout) ... 2.13s oktest_timeout (test.test_concurrent_futures.test_wait.ProcessPoolSpawnWaitTest.test_timeout) ... 1.87s oktest_timeout (test.test_concurrent_futures.test_wait.ThreadPoolWaitTests.test_timeout) ... 0.51s ok----------------------------------------------------------------------Ran 4 tests in 5.294sOK^C

@vstinnervstinner merged commit9be283e intopython:mainSep 28, 2023
@vstinnervstinner deleted the cf_fix_test_timeout branchSeptember 28, 2023 13:21
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestSep 28, 2023
Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.(cherry picked from commit9be283e)Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestSep 28, 2023
Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.(cherry picked from commit9be283e)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

GH-110021 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelSep 28, 2023
@bedevere-app
Copy link

GH-110022 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelSep 28, 2023
vstinner added a commit that referenced this pull requestSep 28, 2023
…110022)gh-109594: Fix concurrent.futures test_timeout() (GH-110018)Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.(cherry picked from commit9be283e)Co-authored-by: Victor Stinner <vstinner@python.org>
csm10495 pushed a commit to csm10495/cpython that referenced this pull requestSep 29, 2023
Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.
Yhg1s pushed a commit that referenced this pull requestOct 2, 2023
…110021)gh-109594: Fix concurrent.futures test_timeout() (GH-110018)Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.(cherry picked from commit9be283e)Co-authored-by: Victor Stinner <vstinner@python.org>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Fix test_timeout() of test_concurrent_futures.test_wait. Remove thefuture which may or may not complete depending if it takes longerthan the timeout ot not. Keep the second future which does notcomplete before wait(). Make also the test faster: 0.5 second insteadof 6 seconds, so remove @support.requires_resource('walltime')decorator.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

testsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@miss-islington

[8]ページ先頭

©2009-2025 Movatter.jp