[Zope3-checkins] CVS: Zope3/src/zodb/zeo/tests - multi.py:1.1.2.3 speed.py:1.1.2.2 stress.py:1.1.2.2 test_zeo.py:1.1.2.3 zeoserver.py:1.1.2.3

Barry Warsaw barry@wooz.org
Mon, 23 Dec 2002 18:49:15 -0500


Update of /cvs-repository/Zope3/src/zodb/zeo/tests
In directory cvs.zope.org:/tmp/cvs-serv1791/src/zodb/zeo/tests

Modified Files:
      Tag: NameGeddon-branch
	multi.py speed.py stress.py test_zeo.py zeoserver.py 
Log Message:
more fixes

move threadedasync.py from the top level into zodb/zeo since it was
causing problems otherwise, and it's only used by zeo now.


=== Zope3/src/zodb/zeo/tests/multi.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zodb/zeo/tests/multi.py:1.1.2.2	Mon Dec 23 16:52:55 2002
+++ Zope3/src/zodb/zeo/tests/multi.py	Mon Dec 23 18:48:44 2002
@@ -14,7 +14,9 @@
 """A multi-client test of the ZEO storage server"""
 # XXX This code is currently broken.
 
-import ZODB, ZODB.DB, ZODB.FileStorage, ZODB.interfaces
+import zodb.db
+from zodb.storage.file import FileStorage
+import zodb.interfaces
 import persistence
 import PersistentMapping
 from zodb.zeo.tests import forker
@@ -53,9 +55,9 @@
     path = tempfile.mktemp()
     if VERBOSE:
         print "FileStorage path:", path
-    fs = ZODB.FileStorage.FileStorage(path)
+    fs = FileStorage(path)
 
-    db = ZODB.DB(fs)
+    db = zodb.db(fs)
     root = db.open().root()
     root["multi"] = PersistentMapping.PersistentMapping()
     get_transaction().commit()
@@ -91,13 +93,13 @@
             time.sleep(CONNECT_DELAY)
     pid = os.getpid()
     print "Client process connected:", pid, storage
-    db = ZODB.DB(storage)
+    db = zodb.db(storage)
     root = db.open().root()
     while 1:
         try:
             s = root[pid] = Stats()
             get_transaction().commit()
-        except ZODB.interfaces.ConflictError:
+        except zodb.interfaces.ConflictError:
             get_transaction().abort()
             time.sleep(CONFLICT_DELAY)
         else:
@@ -113,7 +115,7 @@
             if prev:
                 prev.set_next(r)
             get_transaction().commit()
-        except ZODB.interfaces.ConflictError, err:
+        except zodb.interfaces.ConflictError, err:
             get_transaction().abort()
             time.sleep(CONFLICT_DELAY)
         else:


=== Zope3/src/zodb/zeo/tests/speed.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/zeo/tests/speed.py:1.1.2.1	Mon Dec 23 14:30:53 2002
+++ Zope3/src/zodb/zeo/tests/speed.py	Mon Dec 23 18:48:44 2002
@@ -45,7 +45,7 @@
 import sys, os, getopt, string, time
 ##sys.path.insert(0, os.getcwd())
 
-import ZODB, ZODB.FileStorage
+import zodb.db
 import persistence
 import ZEO.ClientStorage, ZEO.StorageServer
 from zodb.zeo.tests import forker
@@ -163,7 +163,7 @@
                                           (fs_name, 1), domain=domain)
 
     data=open(data).read()
-    db=ZODB.DB(s,
+    db=zodb.db(s,
                # disable cache deactivation
                cache_size=4000,
                cache_deactivate_after=6000,)


=== Zope3/src/zodb/zeo/tests/stress.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/zeo/tests/stress.py:1.1.2.1	Mon Dec 23 14:30:53 2002
+++ Zope3/src/zodb/zeo/tests/stress.py	Mon Dec 23 18:48:44 2002
@@ -20,7 +20,7 @@
 
 from __future__ import nested_scopes
 
-import zodb
+import zodb.db
 from zodb.zeo.client import ClientStorage
 from zodb.storage.mapping import MappingStorage
 from zodb.zeo.tests import forker
@@ -111,7 +111,7 @@
 
 def _start_child(zaddr):
     storage = ClientStorage(zaddr, debug=1, min_disconnect_poll=0.5, wait=1)
-    db = ZODB.DB(storage, pool_size=NUM_CONNECTIONS)
+    db = zodb.db(storage, pool_size=NUM_CONNECTIONS)
     setup(db.open())
     conns = []
     conn_count = 0


=== Zope3/src/zodb/zeo/tests/test_zeo.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zodb/zeo/tests/test_zeo.py:1.1.2.2	Mon Dec 23 17:29:21 2002
+++ Zope3/src/zodb/zeo/tests/test_zeo.py	Mon Dec 23 18:48:44 2002
@@ -11,7 +11,7 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-"""Test suite for ZEO based on ZODB.tests."""
+"""Test suite for ZEO based on zodb.tests."""
 
 # System imports
 import os


=== Zope3/src/zodb/zeo/tests/zeoserver.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zodb/zeo/tests/zeoserver.py:1.1.2.2	Mon Dec 23 17:34:20 2002
+++ Zope3/src/zodb/zeo/tests/zeoserver.py	Mon Dec 23 18:48:44 2002
@@ -21,11 +21,11 @@
 import socket
 import logging
 import asyncore
-import threadedasync
 
 import ZConfig
 from zodb import config
 import zodb.zeo.server
+from zodb.zeo import threadedasync
 
 
 def load_storage(fp):
@@ -151,7 +151,7 @@
     addr = ('', zeo_port)
     logger.info('creating the storage server')
     serv = zodb.zeo.server.StorageServer(addr, {'1': storage}, ro_svr)
-    logger.info('entering ThreadedAsync loop')
+    logger.info('entering threadedasync loop')
     threadedasync.loop()