Skip to content

gh-109401: Fix threading barrier test_default_timeout() #109875

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

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 25, 2023

Increase timeouts. Barrier default timeout should be long enough to spawn 4 threads on a slow CI.

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
@vstinner vstinner enabled auto-merge (squash) September 25, 2023 23:38
@vstinner
Copy link
Member Author

This test is not reliable, it depends on time. I'm not sure how to make the test more reliable without using other synchronization primitives. But this test seems to be a test on a synchronization primitive, but it would be better to avoid using other synchronization primitives to test it...

Well, I wrote the simplest workaround: increase timeouts.

@vstinner vstinner merged commit e5186c3 into python:main Sep 26, 2023
@vstinner vstinner deleted the barrier_timeout branch September 26, 2023 00:07
@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 request Sep 26, 2023
…GH-109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
(cherry picked from commit e5186c3)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

bedevere-app bot commented Sep 26, 2023

GH-109876 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 26, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 26, 2023
…GH-109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
(cherry picked from commit e5186c3)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

bedevere-app bot commented Sep 26, 2023

GH-109877 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Sep 26, 2023
@vstinner
Copy link
Member Author

2 tests failed on Windows x86:

  • FAIL: test_future_times_out (test.test_concurrent_futures.test_as_completed.ThreadPoolAsCompletedTest.test_future_times_out) [0.01]
  • FAIL: test_timeout (test.test_multiprocessing_spawn.test_manager.WithManagerTestBarrier.test_timeout)

vstinner added a commit that referenced this pull request Sep 26, 2023
…9875) (#109877)

gh-109401: Fix threading barrier test_default_timeout() (GH-109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
(cherry picked from commit e5186c3)

Co-authored-by: Victor Stinner <vstinner@python.org>
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
…#109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…#109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants