-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-124402: Speed up test_free_threading and test_super #124491
Conversation
vstinner
commented
Sep 25, 2024
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Reduce the number of iterations and the number of threads so a whole test file takes less than a minute.
- Refactor test_racing_iter_extend() to remove two levels of indentation.
- test_monitoring() uses a sleep of 100 ms instead of 1 second.
- Issue: test_free_threading and test_super take way to long on a Free Threaded build. #124402
* Reduce the number of iterations and the number of threads so a whole test file takes less than a minute. * Refactor test_racing_iter_extend() to remove two levels of indentation. * test_monitoring() uses a sleep of 100 ms instead of 1 second.
@colesbury: Here is a PR to always run tests, but reduce their time budget to stick into 1 minute per test file. How can I check if the modified tests are still useful? |
Linux:
Windows:
|
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.
These LGTM.
I tested a few of these by looking at the PR that added the test and undoing the thread safety changes.
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @vstinner, I could not cleanly backport this to
|
Oh ok, thanks for testing! I merged my PR. |
GH-124585 is a backport of this pull request to the 3.13 branch. |
… (#124585) gh-124402: Speed up test_free_threading and test_super (#124491) * Reduce the number of iterations and the number of threads so a whole test file takes less than a minute. * Refactor test_racing_iter_extend() to remove two levels of indentation. * test_monitoring() uses a sleep of 100 ms instead of 1 second. (cherry picked from commit 0387c34)