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

Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
This commit is contained in:
Victor Stinner 2023-10-11 04:36:06 +02:00 committed by GitHub
parent 1556f426da
commit 790ecf6302
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2578,7 +2578,7 @@ class _TestPool(BaseTestCase):
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)