[Zope-Checkins] CVS: ZODB3/ZEO/tests - testZEO.py:1.75.2.1

Jeremy Hylton cvs-admin at zope.org
Wed Nov 12 17:22:04 EST 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	testZEO.py 
Log Message:
Try to separate ZEO MappingStorage from ZEO File/BDB Storage.

The code used to have override a bunch of tests for MappingStorage
with methods that just said "pass."  That skewed the number of tests
that it claimed to run.

Split the test base class into two classes, one that supports a
"full" storage and one that should work for MappingStorage.  There are
still a bunch of failures.


=== ZODB3/ZEO/tests/testZEO.py 1.75 => 1.75.2.1 ===
--- ZODB3/ZEO/tests/testZEO.py:1.75	Thu Oct  2 14:17:21 2003
+++ ZODB3/ZEO/tests/testZEO.py	Wed Nov 12 17:22:02 2003
@@ -101,14 +101,9 @@
     StorageTestBase.StorageTestBase,
     # ZODB test mixin classes (in the same order as imported)
     BasicStorage.BasicStorage,
-    VersionStorage.VersionStorage,
-    TransactionalUndoStorage.TransactionalUndoStorage,
-    TransactionalUndoVersionStorage.TransactionalUndoVersionStorage,
     PackableStorage.PackableStorage,
     Synchronization.SynchronizedStorage,
     ConflictResolution.ConflictResolvingStorage,
-    ConflictResolution.ConflictResolvingTransUndoStorage,
-    RevisionStorage.RevisionStorage,
     MTStorage.MTStorage,
     ReadOnlyStorage.ReadOnlyStorage,
     # ZEO test mixin classes (in the same order as imported)
@@ -167,8 +162,17 @@
         key = '%s:%s' % (self._storage._storage, self._storage._server_addr)
         self.assertEqual(self._storage.sortKey(), key)
 
+class FullGenericTests(
+    GenericTests,
+    ConflictResolution.ConflictResolvingTransUndoStorage,
+    RevisionStorage.RevisionStorage,
+    TransactionalUndoStorage.TransactionalUndoStorage,
+    TransactionalUndoVersionStorage.TransactionalUndoVersionStorage,
+    VersionStorage.VersionStorage,
+    ):
+    """Extend GenericTests with tests that MappingStorage can't pass."""
 
-class FileStorageTests(GenericTests):
+class FileStorageTests(FullGenericTests):
     """Test ZEO backed by a FileStorage."""
     level = 2
 
@@ -180,7 +184,7 @@
         </filestorage>
         """ % filename
 
-class BDBTests(FileStorageTests):
+class BDBTests(FullGenericTests):
     """ZEO backed by a Berkeley full storage."""
     level = 2
 
@@ -192,67 +196,14 @@
         </fullstorage>
         """ % self._envdir
 
-class MappingStorageTests(FileStorageTests):
+class MappingStorageTests(GenericTests):
     """ZEO backed by a Mapping storage."""
 
     def getConfig(self):
         return """<mappingstorage 1/>"""
 
-    # Tests which MappingStorage can't possibly pass, because it doesn't
-    # support versions or undo.
-    def checkVersions(self): pass
-    def checkVersionedStoreAndLoad(self): pass
-    def checkVersionedLoadErrors(self): pass
-    def checkVersionLock(self): pass
-    def checkVersionEmpty(self): pass
-    def checkUndoUnresolvable(self): pass
-    def checkUndoInvalidation(self): pass
-    def checkUndoInVersion(self): pass
-    def checkUndoCreationBranch2(self): pass
-    def checkUndoCreationBranch1(self): pass
-    def checkUndoConflictResolution(self): pass
-    def checkUndoCommitVersion(self): pass
-    def checkUndoAbortVersion(self): pass
-    def checkPackUndoLog(self): pass
-    def checkUndoLogMetadata(self): pass
-    def checkTwoObjectUndoAtOnce(self): pass
-    def checkTwoObjectUndoAgain(self): pass
-    def checkTwoObjectUndo(self): pass
-    def checkTransactionalUndoAfterPackWithObjectUnlinkFromRoot(self): pass
-    def checkTransactionalUndoAfterPack(self): pass
-    def checkSimpleTransactionalUndo(self): pass
-    def checkReadMethods(self): pass
-    def checkPackAfterUndoDeletion(self): pass
-    def checkPackAfterUndoManyTimes(self): pass
-    def checkPackVersions(self): pass
-    def checkPackUnlinkedFromRoot(self): pass
-    def checkPackOnlyOneObject(self): pass
-    def checkPackJustOldRevisions(self): pass
-    def checkPackEmptyStorage(self): pass
-    def checkPackAllRevisions(self): pass
-    def checkPackVersionsInPast(self): pass
-    def checkPackVersionReachable(self): pass
-    def checkNotUndoable(self): pass
-    def checkNewSerialOnCommitVersionToVersion(self): pass
-    def checkModifyAfterAbortVersion(self): pass
-    def checkLoadSerial(self): pass
-    def checkCreateObjectInVersionWithAbort(self): pass
-    def checkCommitVersionSerialno(self): pass
-    def checkCommitVersionInvalidation(self): pass
-    def checkCommitToOtherVersion(self): pass
-    def checkCommitToNonVersion(self): pass
-    def checkCommitLockUndoFinish(self): pass
-    def checkCommitLockUndoClose(self): pass
-    def checkCommitLockUndoAbort(self): pass
-    def checkCommitEmptyVersionInvalidation(self): pass
-    def checkCreationUndoneGetSerial(self): pass
-    def checkAbortVersionSerialno(self): pass
-    def checkAbortVersionInvalidation(self): pass
-    def checkAbortVersionErrors(self): pass
-    def checkAbortVersion(self): pass
-    def checkAbortOneVersionCommitTheOther(self): pass
-    def checkResolve(self): pass
-    def check4ExtStorageThread(self): pass
+    # XXX There are still a bunch of tests that fail.  Are there
+    # still test classes in GenericTests that shouldn't be there?
 
 test_classes = [FileStorageTests, MappingStorageTests]
 




More information about the Zope-Checkins mailing list