gh-108388: Convert test_concurrent_futures to package#108401
Conversation
Convert test_concurrent_futures to a package of 7 sub-tests. Add remote_globals to create_executor_tests()
|
Timing of running tests:
With the PR: |
Sorry, something went wrong.
sobolevn
left a comment
There was a problem hiding this comment.
To fix the CI
Sorry, something went wrong.
|
GHA job timings:
Details. Windows x86: Windows x64: macOS: Ubuntu: Address Sanitizer: |
Sorry, something went wrong.
gpshead
left a comment
There was a problem hiding this comment.
I believe you unintentionally got rid of most of the Threading tests.
(do not merge this even after fixing up this review round's comments, this requires further very close side by side review that Github's UI is incapable of providing as it lacks the ability to track file splits and moves as a diff of what's changed -- I'll need to spend time on the command line in a client looking things over)
Otherwise: Thank you for taking this on! This test suite has needed refactoring into something manageable forever.
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
|
I moved this PR to Draft state to signal that I don't want anyone to think it is ready to merge even if someone approves it until after we've taken a close look to verify that we haven't lost anything in the refactoring. |
Sorry, something went wrong.
I compared |
Sorry, something went wrong.
|
For your comments like "ThreadPoolExecutorTest is defined above but missing here" on test_process_pool.py, I suggest you looking at which tests are executed rather than only looking at the code. For example: You can compare between the main branch and my PR: I get the same 15 tests, but with my PR, test names also get an additional |
Sorry, something went wrong.
|
I splitted test_process_pool in two testrs:
Before, test_process_poll was the sum (75 tests, ~42 sec) 🙂. |
Sorry, something went wrong.
|
Thanks. confirmed locally as well, all tests are present and accounted for! |
Sorry, something went wrong.
|
Thanks for the review @gpshead! For sure, there is room for improvement for these tests. I hope that this split will ease future maintenance. |
Sorry, something went wrong.
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
|
Sorry, @vstinner, I could not cleanly backport this to |
Sorry, something went wrong.
|
the merge conflict on this is probably just the list in regrtest runtests.py. retry that automation after the test_multiprocessing one is in 3.12. |
Sorry, something went wrong.
Right. I backported the change to Python 3.12. There is a minor conflict in libregrtest on: The backport is in conflict with PR #108401 (split multiprocessing tests) which may be merged first. |
Sorry, something went wrong.
|
Since I was asked to backport all test changes (including refactoring) to stable branches, I backport this change to Python 3.11: GH-109704. |
Sorry, something went wrong.
#109704) * gh-108388: Convert test_concurrent_futures to package (#108401) Convert test_concurrent_futures to a package of sub-tests. (cherry picked from commit aa6f787) Notes on backport to 3.11: * AsCompletedTests: Revert test_future_times_out() => test_zero_timeout() * Restore TODO comment * ThreadPoolExecutorTest.test_hang_global_shutdown_lock(): add @support.requires_resource('cpu').
Convert test_concurrent_futures to a package of 7 sub-tests.
Add remote_globals to create_executor_tests()