[Python-checkins] r79811 - in python/trunk/Lib/test: test_os.py win_console_handler.py

brian.curtin python-checkins at python.org
Mon Apr 5 21:04:23 CEST 2010


Author: brian.curtin
Date: Mon Apr  5 21:04:23 2010
New Revision: 79811

Log:
Fix a failing test on an apparently slow Windows buildbot.

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.


Modified:
   python/trunk/Lib/test/test_os.py
   python/trunk/Lib/test/win_console_handler.py

Modified: python/trunk/Lib/test/test_os.py
==============================================================================
--- python/trunk/Lib/test/test_os.py	(original)
+++ python/trunk/Lib/test/test_os.py	Mon Apr  5 21:04:23 2010
@@ -697,11 +697,11 @@
                                 "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)

Modified: python/trunk/Lib/test/win_console_handler.py
==============================================================================
--- python/trunk/Lib/test/win_console_handler.py	(original)
+++ python/trunk/Lib/test/win_console_handler.py	Mon Apr  5 21:04:23 2010
@@ -39,4 +39,5 @@
         exit(-1)
 
     # Do nothing but wait for the signal
-    input()
+    while True:
+        pass


More information about the Python-checkins mailing list