Skip to content

Commit

Permalink
[3.11] gh-110662: multiprocessing test_async_timeout() increase timeo…
Browse files Browse the repository at this point in the history
…ut (GH-110663) (#110675)

gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663)

Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
(cherry picked from commit 790ecf6)

Co-authored-by: Victor Stinner <[email protected]>
  • Loading branch information
miss-islington and vstinner authored Oct 11, 2023
1 parent 8ca7a23 commit c6d5628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ def test_async(self):
self.assertTimingAlmostEqual(get.elapsed, TIMEOUT1)

def test_async_timeout(self):
res = self.pool.apply_async(sqr, (6, TIMEOUT2 + 1.0))
res = self.pool.apply_async(sqr, (6, TIMEOUT2 + support.SHORT_TIMEOUT))
get = TimingWrapper(res.get)
self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2)
self.assertTimingAlmostEqual(get.elapsed, TIMEOUT2)
Expand Down

0 comments on commit c6d5628

Please sign in to comment.