Skip to content

Commit

Permalink
gh-110662: multiprocessing test_async_timeout() increase timeout (#11…
Browse files Browse the repository at this point in the history
…0663)

Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
  • Loading branch information
vstinner authored Oct 11, 2023
1 parent 1556f42 commit 790ecf6
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 790ecf6

Please sign in to comment.