mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.
WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb3214d)
Co-authored-by: Victor Stinner <vstinner@python.org>
			
			
This commit is contained in:
		
							parent
							
								
									d881002fbd
								
							
						
					
					
						commit
						0ff487b8ab
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		|  | @ -107,7 +107,8 @@ def test_popen(self): | |||
| 
 | ||||
|         events = [ovin.event, ovout.event, overr.event] | ||||
|         # Super-long timeout for slow buildbots. | ||||
|         res = _winapi.WaitForMultipleObjects(events, True, 10000) | ||||
|         res = _winapi.WaitForMultipleObjects(events, True, | ||||
|                                              int(support.SHORT_TIMEOUT * 1000)) | ||||
|         self.assertEqual(res, _winapi.WAIT_OBJECT_0) | ||||
|         self.assertFalse(ovout.pending) | ||||
|         self.assertFalse(overr.pending) | ||||
|  |  | |||
|  | @ -0,0 +1,4 @@ | |||
| Fix asyncio test_popen() of test_windows_utils by using a longer timeout. | ||||
| Use military grade battle-tested :data:`test.support.SHORT_TIMEOUT` timeout | ||||
| rather than a hardcoded timeout of 10 seconds: it's 30 seconds by default, but | ||||
| it is made longer on slow buildbots. Patch by Victor Stinner. | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)