summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-19 23:06:53 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-19 23:06:53 (GMT)
commitfedd481596799419c0019a37ae1b9319abeacdc8 (patch)
treeed5be555516783cd28e1e30e65b2eb888b6989fc /Lib/test
parentfb8db8f6353202f7a821ed3ec1f39c96ef672779 (diff)
downloadcpython-fedd481596799419c0019a37ae1b9319abeacdc8.zip
cpython-fedd481596799419c0019a37ae1b9319abeacdc8.tar.gz
cpython-fedd481596799419c0019a37ae1b9319abeacdc8.tar.bz2
Try to make signal-sending tests in test_subprocess more robust on slow machines
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_subprocess.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 5cc8903..7341b0b 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -830,16 +830,18 @@ class POSIXProcessTestCase(BaseTestCase):
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
# Let the process initialize (Issue #3137)
- time.sleep(0.1)
+ time.sleep(0.4)
# The process should not terminate prematurely
self.assertIsNone(p.poll())
# Retry if the process do not receive the signal.
- count, maxcount = 0, 3
+ count, maxcount = 0, 10
while count < maxcount and p.poll() is None:
getattr(p, method)(*args)
time.sleep(0.1)
count += 1
+ if count == maxcount:
+ self.skipTest("apparently failed to send the signal")
self.assertIsNotNone(p.poll(), "the subprocess did not terminate")
if count > 1:
print("p.{}{} succeeded after "