mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Tests call sleeping_retry() with SHORT_TIMEOUT (#93870)
Tests now call busy_retry() and sleeping_retry() with SHORT_TIMEOUT or LONG_TIMEOUT (of test.support), rather than hardcoded constants. Add also WAIT_ACTIVE_CHILDREN_TIMEOUT constant to _test_multiprocessing.
This commit is contained in:
parent
46e455f21c
commit
50e0866f87
6 changed files with 16 additions and 9 deletions
|
@ -812,7 +812,7 @@ class ItimerTest(unittest.TestCase):
|
|||
signal.signal(signal.SIGVTALRM, self.sig_vtalrm)
|
||||
signal.setitimer(self.itimer, 0.3, 0.2)
|
||||
|
||||
for _ in support.busy_retry(60.0, error=False):
|
||||
for _ in support.busy_retry(support.LONG_TIMEOUT, error=False):
|
||||
# use up some virtual time by doing real work
|
||||
_ = pow(12345, 67890, 10000019)
|
||||
if signal.getitimer(self.itimer) == (0.0, 0.0):
|
||||
|
@ -833,7 +833,7 @@ class ItimerTest(unittest.TestCase):
|
|||
signal.signal(signal.SIGPROF, self.sig_prof)
|
||||
signal.setitimer(self.itimer, 0.2, 0.2)
|
||||
|
||||
for _ in support.busy_retry(60.0, error=False):
|
||||
for _ in support.busy_retry(support.LONG_TIMEOUT, error=False):
|
||||
# do some work
|
||||
_ = pow(12345, 67890, 10000019)
|
||||
if signal.getitimer(self.itimer) == (0.0, 0.0):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue