[Zodb-checkins] CVS: Packages/ZEO - testZEO.py:1.4
jeremy@digicool.com
jeremy@digicool.com
Tue, 8 May 2001 17:25:25 -0400 (EDT)
Update of /cvs-repository/Packages/ZEO/tests
In directory korak:/tmp/cvs-serv15788/tests
Modified Files:
testZEO.py
Log Message:
Add new tests from ZEO2.
XXX The two cache invalidation tests fails currently.
--- Updated File testZEO.py in package Packages/ZEO --
--- testZEO.py 2001/05/01 19:54:33 1.3
+++ testZEO.py 2001/05/08 21:25:24 1.4
@@ -9,16 +9,18 @@
import ZEO.ClientStorage, ZEO.StorageServer
import ThreadedAsync, ZEO.trigger
+from ZODB.FileStorage import FileStorage
-from ZEO.tests import forker
+from ZEO.tests import forker, Cache
# Sorry Jim...
from ZODB.tests import StorageTestBase, BasicStorage, VersionStorage, \
TransactionalUndoStorage, TransactionalUndoVersionStorage, \
- PackableStorage, Synchronization
+ PackableStorage, Synchronization, ConflictResolution
+from ZODB.tests.MinPO import MinPO
+
ZERO = '\0'*8
-import pickle
class DummyDB:
def invalidate(self, *args):
@@ -59,9 +61,9 @@
if revid is None:
revid = ZERO
if data is None:
- data = 7
+ data = MinPO(7)
if not already_pickled:
- data = pickle.dumps(data)
+ data = StorageTestBase.zodb_pickle(data)
if version is None:
version = ''
# Begin the transaction
@@ -91,12 +93,18 @@
raise serial
d[oid] = serial
return d
+
+ def checkLargeUpdate(self):
+ obj = MinPO("X" * (10 * 128 * 1024))
+ self._dostore(data=obj)
class GenericTests(ZEOTestBase,
+ Cache.StorageWithCache,
BasicStorage.BasicStorage,
VersionStorage.VersionStorage,
PackableStorage.PackableStorage,
Synchronization.SynchronizedStorage,
+ ConflictResolution.ConflictResolvingStorage,
):
"""An abstract base class for ZEO tests
@@ -133,14 +141,12 @@
class ZEOFileStorageTests(GenericTests):
__super_setUp = GenericTests.setUp
- from ZODB.FileStorage import FileStorage
-
def setUp(self):
self.__fs_base = tempfile.mktemp()
self.__super_setUp()
def getStorage(self):
- return self.FileStorage(self.__fs_base, create=1)
+ return FileStorage(self.__fs_base, create=1)
def delStorage(self):
# file storage appears to create three files