]> granicus.if.org Git - python/commitdiff
Fix a failing test on an apparently slow Windows buildbot.
authorBrian Curtin <brian.curtin@gmail.com>
Mon, 5 Apr 2010 19:04:23 +0000 (19:04 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Mon, 5 Apr 2010 19:04:23 +0000 (19:04 +0000)
On slower Windows machines, waiting 0.1 seconds can sometimes not be
enough for a subprocess to start and be ready to accept signals, causing
the test to fail. One buildbot is also choking on input()/EOFError so
that was changed to not depend on input.

Lib/test/test_os.py
Lib/test/win_console_handler.py

index 2fc0d07ccbd2a05f511c4feacdf186c0b4a51f3d..ef85be54d735186b92e3a8c0cf1666e4784443af 100644 (file)
@@ -697,11 +697,11 @@ class Win32KillTests(unittest.TestCase):
                                 "win_console_handler.py")],
                    creationflags=subprocess.CREATE_NEW_PROCESS_GROUP)
         # Let the interpreter startup before we send signals. See #3137.
-        time.sleep(0.1)
+        time.sleep(0.5)
         os.kill(proc.pid, event)
         # proc.send_signal(event) could also be done here.
         # Allow time for the signal to be passed and the process to exit.
-        time.sleep(0.1)
+        time.sleep(0.5)
         if not proc.poll():
             # Forcefully kill the process if we weren't able to signal it.
             os.kill(proc.pid, signal.SIGINT)
index 5c6c7414d118ce841bcfcb9a8d248bab3452d3c8..17bbe1af48a8085f2c7c3b46a44672bd5e55b660 100644 (file)
@@ -39,4 +39,5 @@ if __name__ == "__main__":
         exit(-1)
 
     # Do nothing but wait for the signal
-    input()
+    while True:
+        pass