Skip to content

Commit

Permalink
[3.12] pythongh-110662: multiprocessing test_async_timeout() increase…
Browse files Browse the repository at this point in the history
… timeout (pythonGH-110663) (python#110674)

pythongh-110662: multiprocessing test_async_timeout() increase timeout (pythonGH-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 <vstinner@python.org>
  • Loading branch information
miss-islington and vstinner authored Oct 11, 2023
1 parent 18458a5 commit be381b5
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 @@ -2578,7 +2578,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 be381b5

Please sign in to comment.