[Neo-report] r2837 jm - /trunk/neo/tests/functional/__init__.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 8 20:43:58 CEST 2011


Author: jm
Date: Thu Sep  8 20:43:57 2011
New Revision: 2837

Log:
Fix resource leak preventing running several tests on the same machine

Subprocesses should free file descriptors (here a system-wide lock)
they don't need.

Modified:
    trunk/neo/tests/functional/__init__.py

Modified: trunk/neo/tests/functional/__init__.py
==============================================================================
--- trunk/neo/tests/functional/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/__init__.py [iso-8859-1] Thu Sep  8 20:43:57 2011
@@ -163,6 +163,9 @@ class NEOProcess(object):
             # prevent child from killing anything
             del self.__class__.__del__
             try:
+                # release system-wide lock
+                for allocator in PortAllocator.allocator_set.copy():
+                    allocator.reset()
                 sys.argv = [command] + args
                 getattr(neo.scripts,  command).main()
                 sys.exit()




More information about the Neo-report mailing list