Title: gh-122957: Fix test flakiness in free-thread build by lesteve · Pull Request #124039 · python/cpython · GitHub
Open Graph Title: gh-122957: Fix test flakiness in free-thread build by lesteve · Pull Request #124039 · python/cpython
X Title: gh-122957: Fix test flakiness in free-thread build by lesteve · Pull Request #124039 · python/cpython
Description: Fix #122957. Locally I tested this by running the test 1000 times with the command and the diff below. It fails around 10-20 times out of 1000 on main and does not fail out of 1000 times with the fix on this PR. ./python -m test.test_asyncio.test_threads -k concurrent -v diff --git a/Lib/test/test_asyncio/test_threads.py b/Lib/test/test_asyncio/test_threads.py index 774380270a7..8504544aaba 100644 --- a/Lib/test/test_asyncio/test_threads.py +++ b/Lib/test/test_asyncio/test_threads.py @@ -63,4 +63,10 @@ def get_ctx(): if __name__ == "__main__": - unittest.main() + nb_tests = 1000 + suite = unittest.TestSuite( + [ToThreadTests("test_to_thread_concurrent") for _ in range(nb_tests)] + ) + + test_runner = unittest.TextTestRunner() + test_runner.run(suite) Issue: gh-122957
Open Graph Description: Fix #122957. Locally I tested this by running the test 1000 times with the command and the diff below. It fails around 10-20 times out of 1000 on main and does not fail out of 1000 times with the f...
X Description: Fix #122957. Locally I tested this by running the test 1000 times with the command and the diff below. It fails around 10-20 times out of 1000 on main and does not fail out of 1000 times with the f...
Opengraph URL: https://github.com/python/cpython/pull/124039
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:71f28fc7-e0c2-1bd5-1baa-6ce5b821d795 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D836:2F0FE8:2A746AD:3926C79:6A53AE32 |
| html-safe-nonce | 37605d8e47d1324f8f924b2e28857894873fb63d0acd8052d92fcaca91054c0a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODM2OjJGMEZFODoyQTc0NkFEOjM5MjZDNzk6NkE1M0FFMzIiLCJ2aXNpdG9yX2lkIjoiMjk1MjcwNjg5NzI4MTc4OTQ5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 67e0aae6f3290438aa7ae6cf4f019e80cfd3dccc39aea659d0f78614f6cfa721 |
| hovercard-subject-tag | pull_request:2070250794 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/124039/files |
| twitter:image | https://avatars.githubusercontent.com/u/1680079?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1680079?s=400&v=4 |
| og:image:alt | Fix #122957. Locally I tested this by running the test 1000 times with the command and the diff below. It fails around 10-20 times out of 1000 on main and does not fail out of 1000 times with the f... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width