[Zope-CVS] CVS: ZODB4/ZEO/tests - Cache.py:1.9 CommitLockTests.py:1.5 ThreadTests.py:1.4 multi.py:1.9 speed.py:1.8 stress.py:1.7 testZEO.py:1.26

Jeremy Hylton jeremy@zope.com
Mon, 12 Aug 2002 18:59:06 -0400


Update of /cvs-repository/ZODB4/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv547/ZEO/tests

Modified Files:
	Cache.py CommitLockTests.py ThreadTests.py multi.py speed.py 
	stress.py testZEO.py 
Log Message:
Update ZEO to work with ZODB4/Zope3.

XXX testLogRestart fails



=== ZODB4/ZEO/tests/Cache.py 1.8 => 1.9 ===
--- ZODB4/ZEO/tests/Cache.py:1.8	Tue Jun 11 09:43:06 2002
+++ ZODB4/ZEO/tests/Cache.py	Mon Aug 12 18:59:05 2002
@@ -13,7 +13,7 @@
 ##############################################################################
 """Tests of the ZEO cache"""
 
-from ZODB.Transaction import Transaction
+from ZODB.ZTransaction import Transaction
 from ZODB.tests.MinPO import MinPO
 from ZODB.tests.StorageTestBase import zodb_unpickle
 


=== ZODB4/ZEO/tests/CommitLockTests.py 1.4 => 1.5 ===
--- ZODB4/ZEO/tests/CommitLockTests.py:1.4	Mon Aug  5 18:32:54 2002
+++ ZODB4/ZEO/tests/CommitLockTests.py	Mon Aug 12 18:59:05 2002
@@ -13,9 +13,11 @@
 ##############################################################################
 """Tests of the distributed commit lock."""
 
+import time
 import threading
 
-from ZODB.Transaction import Transaction
+from ZODB.TimeStamp import TimeStamp
+from ZODB.ZTransaction import Transaction
 from ZODB.tests.StorageTestBase import zodb_pickle, MinPO
 
 import ZEO.ClientStorage
@@ -115,7 +117,7 @@
         for i in range(4):
             storage2 = self._duplicate_client()
             t2 = Transaction()
-            tid = `ZEO.ClientStorage.get_timestamp()` # XXX why?
+            tid = self._get_timestamp()
             dosetup(storage2, t2, tid)
             if i == 0:
                 storage2.close()
@@ -169,11 +171,11 @@
         # address.
         addr = self._storage._rpc_mgr.addr[0][1]
         new = ZEO.ClientStorage.ClientStorage(addr, wait=1)
-        new.registerDB(DummyDB(), None)
+        new.registerDB(DummyDB())
         return new
 
     def _get_timestamp(self):
         t = time.time()
         t = apply(TimeStamp,(time.gmtime(t)[:5]+(t%60,)))
-        return `t`
+        return t.raw()
 


=== ZODB4/ZEO/tests/ThreadTests.py 1.3 => 1.4 ===
--- ZODB4/ZEO/tests/ThreadTests.py:1.3	Tue Aug  6 12:35:34 2002
+++ ZODB4/ZEO/tests/ThreadTests.py	Mon Aug 12 18:59:05 2002
@@ -15,7 +15,7 @@
 
 import threading
 
-from ZODB.Transaction import Transaction
+from ZODB.ZTransaction import Transaction
 from ZODB.tests.StorageTestBase import zodb_pickle, MinPO
 
 import ZEO.ClientStorage


=== ZODB4/ZEO/tests/multi.py 1.8 => 1.9 ===
--- ZODB4/ZEO/tests/multi.py:1.8	Tue Jun 11 09:43:06 2002
+++ ZODB4/ZEO/tests/multi.py	Mon Aug 12 18:59:05 2002
@@ -17,6 +17,7 @@
 import Persistence
 import PersistentMapping
 from ZEO.tests import forker
+from Transaction import get_transaction
 
 import asyncore
 import os


=== ZODB4/ZEO/tests/speed.py 1.7 => 1.8 ===
--- ZODB4/ZEO/tests/speed.py:1.7	Tue Jun 11 09:43:06 2002
+++ ZODB4/ZEO/tests/speed.py	Mon Aug 12 18:59:05 2002
@@ -47,6 +47,7 @@
 
 import ZODB, ZODB.FileStorage
 import Persistence
+from Transaction import get_transaction
 import ZEO.ClientStorage, ZEO.StorageServer
 from ZEO.tests import forker
 from ZODB.POSException import ConflictError


=== ZODB4/ZEO/tests/stress.py 1.6 => 1.7 ===
--- ZODB4/ZEO/tests/stress.py:1.6	Tue Jun 11 09:43:06 2002
+++ ZODB4/ZEO/tests/stress.py	Mon Aug 12 18:59:05 2002
@@ -24,6 +24,7 @@
 from ZEO.tests import forker
 from ZODB.tests import MinPO
 import zLOG
+from Transaction import get_transaction
 
 import os
 import random


=== ZODB4/ZEO/tests/testZEO.py 1.25 => 1.26 ===
--- ZODB4/ZEO/tests/testZEO.py:1.25	Tue Jun 11 09:43:06 2002
+++ ZODB4/ZEO/tests/testZEO.py	Mon Aug 12 18:59:05 2002
@@ -28,9 +28,10 @@
 import ZEO.ClientStorage, ZEO.StorageServer
 import ThreadedAsync, ZEO.trigger
 from ZODB.FileStorage import FileStorage
-from ZODB.Transaction import Transaction
+from ZODB.ZTransaction import Transaction
 from ZODB.tests.StorageTestBase import zodb_pickle, MinPO
 import zLOG
+from Transaction import get_transaction
 
 from ZEO.tests import forker, Cache, CommitLockTests, ThreadTests
 from ZEO.smac import Disconnected
@@ -88,7 +89,7 @@
         self._pids = [pid]
         self._servers = [exit]
         self._storage = PackWaitWrapper(client)
-        client.registerDB(DummyDB(), None)
+        client.registerDB(DummyDB())
 
     def tearDown(self):
         self.running = 0
@@ -174,7 +175,7 @@
         storage = ZEO.ClientStorage.ClientStorage(zeo_addr, wait=1,
                                                   min_disconnect_poll=0.1)
         self._storage = PackWaitWrapper(storage)
-        storage.registerDB(DummyDB(), None)
+        storage.registerDB(DummyDB())
 
     def tearDown(self):
         self._storage.close()
@@ -241,7 +242,7 @@
                                                wait=wait,
                                                min_disconnect_poll=0.1)
         storage = PackWaitWrapper(base)
-        storage.registerDB(DummyDB(), None)
+        storage.registerDB(DummyDB())
         return storage
 
     def tearDown(self):