Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 790ecf6

Browse files
authored
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.
1 parent 1556f42 commit 790ecf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ def test_async(self):
25782578
self.assertTimingAlmostEqual(get.elapsed, TIMEOUT1)
25792579

25802580
def test_async_timeout(self):
2581-
res = self.pool.apply_async(sqr, (6, TIMEOUT2 + 1.0))
2581+
res = self.pool.apply_async(sqr, (6, TIMEOUT2 + support.SHORT_TIMEOUT))
25822582
get = TimingWrapper(res.get)
25832583
self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2)
25842584
self.assertTimingAlmostEqual(get.elapsed, TIMEOUT2)

0 commit comments

Comments
 (0)