• Julien Muchembled's avatar
    Partially fix race conditions when allocating ports · d9b41a14
    Julien Muchembled authored
    This fixes errors like:
    - ConnectorException: makeListeningConnection on ('127.0.0.1', 33157) failed: 98:Address already in use
      Error executing './neomaster ...
    - "error: [Errno 22] Invalid argument" in __allocatePort
    
    A system-wide lock is used to prevent conflicts when several NEO test suites are
    run simultaneously.
    
    However, errors could still happen if other software tries to allocate ports.
    Allocated ports are kept open as long as possible to minimize the probability
    that it happens: they are closed just before spawning subprocesses.
    
    git-svn-id: https://svn.erp5.org/repos/neo/trunk@2665 71dcc9de-d417-0410-9af5-da40c76e7ee4
    d9b41a14
__init__.py 22.9 KB