logging.warning('baz')
# Need to let the listener thread finish its work
- while support.sleeping_retry(support.LONG_TIMEOUT, error=False):
+ while support.sleeping_retry(support.LONG_TIMEOUT,
+ "queue not empty"):
if qh.listener.queue.empty():
break
- else:
- self.fail("queue not empty")
with open(fn, encoding='utf-8') as f:
data = f.read().splitlines()
signal.signal(signal.SIGVTALRM, self.sig_vtalrm)
signal.setitimer(self.itimer, 0.3, 0.2)
- for _ in support.busy_retry(support.LONG_TIMEOUT, error=False):
+ for _ in support.busy_retry(support.LONG_TIMEOUT):
# use up some virtual time by doing real work
_ = pow(12345, 67890, 10000019)
if signal.getitimer(self.itimer) == (0.0, 0.0):
# sig_vtalrm handler stopped this itimer
break
- else:
- # bpo-8424
- self.skipTest("timeout: likely cause: machine too slow or load too "
- "high")
# virtual itimer should be (0.0, 0.0) now
self.assertEqual(signal.getitimer(self.itimer), (0.0, 0.0))
signal.signal(signal.SIGPROF, self.sig_prof)
signal.setitimer(self.itimer, 0.2, 0.2)
- for _ in support.busy_retry(support.LONG_TIMEOUT, error=False):
+ for _ in support.busy_retry(support.LONG_TIMEOUT):
# do some work
_ = pow(12345, 67890, 10000019)
if signal.getitimer(self.itimer) == (0.0, 0.0):
# sig_prof handler stopped this itimer
break
- else:
- # bpo-8424
- self.skipTest("timeout: likely cause: machine too slow or load too "
- "high")
# profiling itimer should be (0.0, 0.0) now
self.assertEqual(signal.getitimer(self.itimer), (0.0, 0.0))
expected_sigs += 2
# Wait for handlers to run to avoid signal coalescing
- for _ in support.sleeping_retry(support.SHORT_TIMEOUT, error=False):
+ for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
if len(sigs) >= expected_sigs:
break
# This many iterations can be required, since some previously run
# tests (e.g. test_ctypes) could have spawned a lot of children
# very quickly.
- for _ in support.sleeping_retry(support.SHORT_TIMEOUT, error=False):
+ for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
# wait3() shouldn't hang, but some of the buildbots seem to hang
# in the forking tests. This is an attempt to fix the problem.
spid, status, rusage = os.wait3(os.WNOHANG)
# Issue #11185: wait4 is broken on AIX and will always return 0
# with WNOHANG.
option = 0
- for _ in support.sleeping_retry(support.SHORT_TIMEOUT, error=False):
+ for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
# wait4() shouldn't hang, but some of the buildbots seem to hang
# in the forking tests. This is an attempt to fix the problem.
spid, status, rusage = os.wait4(cpid, option)