[Zodb-checkins] CVS: ZODB3/ZEO/tests - forker.py:1.27

Barry Warsaw barry@wooz.org
Mon, 16 Dec 2002 18:34:38 -0500


Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv26732

Modified Files:
	forker.py 
Log Message:
Back porting fixes from zodb4 to specify a `keep' flag on the
storage's artifacts.  Some tests expect to reconnect in read-only mode
to a previously created storage.


=== ZODB3/ZEO/tests/forker.py 1.26 => 1.27 ===
--- ZODB3/ZEO/tests/forker.py:1.26	Fri Dec 13 17:31:42 2002
+++ ZODB3/ZEO/tests/forker.py	Mon Dec 16 18:34:37 2002
@@ -17,10 +17,8 @@
 import sys
 import time
 import errno
-import types
 import random
 import socket
-import asyncore
 import tempfile
 import traceback
 
@@ -31,6 +29,7 @@
 if PROFILE:
     import hotshot
 
+
 def get_port():
     """Return a port that is not in use.
 
@@ -53,7 +52,7 @@
     raise RuntimeError, "Can't find port"
 
 
-def start_zeo_server(conf, addr=None, ro_svr=0):
+def start_zeo_server(conf, addr=None, ro_svr=0, keep=0):
     """Start a ZEO server in a separate process.
 
     Returns the ZEO port, the test server port, and the pid.
@@ -76,6 +75,8 @@
     args = [sys.executable, script, '-C', tmpfile]
     if ro_svr:
         args.append('-r')
+    if keep:
+        args.append('-k')
     args.append(str(port))
     d = os.environ.copy()
     d['PYTHONPATH'] = os.pathsep.join(sys.path)