mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Try to fix sporadic test_multiprocessing failure
This commit is contained in:
		
						commit
						e21a596d51
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
					@ -11,6 +11,7 @@ import io
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import gc
 | 
					import gc
 | 
				
			||||||
 | 
					import errno
 | 
				
			||||||
import signal
 | 
					import signal
 | 
				
			||||||
import array
 | 
					import array
 | 
				
			||||||
import socket
 | 
					import socket
 | 
				
			||||||
| 
						 | 
					@ -1371,7 +1372,16 @@ class _TestManagerRestart(BaseTestCase):
 | 
				
			||||||
        manager.shutdown()
 | 
					        manager.shutdown()
 | 
				
			||||||
        manager = QueueManager(
 | 
					        manager = QueueManager(
 | 
				
			||||||
            address=addr, authkey=authkey, serializer=SERIALIZER)
 | 
					            address=addr, authkey=authkey, serializer=SERIALIZER)
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
            manager.start()
 | 
					            manager.start()
 | 
				
			||||||
 | 
					        except IOError as e:
 | 
				
			||||||
 | 
					            if e.errno != errno.EADDRINUSE:
 | 
				
			||||||
 | 
					                raise
 | 
				
			||||||
 | 
					            # Retry after some time, in case the old socket was lingering
 | 
				
			||||||
 | 
					            # (sporadic failure on buildbots)
 | 
				
			||||||
 | 
					            time.sleep(1.0)
 | 
				
			||||||
 | 
					            manager = QueueManager(
 | 
				
			||||||
 | 
					                address=addr, authkey=authkey, serializer=SERIALIZER)
 | 
				
			||||||
        manager.shutdown()
 | 
					        manager.shutdown()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue