Kaydet (Commit) 149b1c77 authored tarafından Victor Stinner's avatar Victor Stinner

Use a sleep for test_subprocess timeout test

instead of an active loop (while True: pass) to limit race conditions.
üst 368f34bb
......@@ -127,9 +127,10 @@ class ProcessTestCase(BaseTestCase):
with self.assertRaises(subprocess.TimeoutExpired) as c:
output = subprocess.check_output(
[sys.executable, "-c",
"import sys; sys.stdout.write('BDFL')\n"
"import sys, time\n"
"sys.stdout.write('BDFL')\n"
"sys.stdout.flush()\n"
"while True: pass"],
"time.sleep(3600)"],
# Some heavily loaded buildbots (sparc Debian 3.x) require
# this much time to start and print.
timeout=3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment