[Zodb-checkins] SVN: ZODB/branches/3.8/src/ZEO/tests/testZEO.py Restored some tests that had been inadvertantly disabled in a branh

Jim Fulton jim at zope.com
Fri Dec 19 09:35:54 EST 2008


Log message for revision 94193:
  Restored some tests that had been inadvertantly disabled in a branh
  merge a couple of years ago.  Fortunately, they still pass, so no new
  release is indicated.
  
  I didn't restore and removed one silly test class, OneTimeTests,
  related to obsolete packing issues.
  
  I didn't restore and removed another silly test class,
  DemoStorageWrappedAroundClientStorage, because it is an error to wrap
  a demo storage around a client storage. A DemoStorage should only wrap
  a storage who's data never changes.
  

Changed:
  U   ZODB/branches/3.8/src/ZEO/tests/testZEO.py

-=-
Modified: ZODB/branches/3.8/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/branches/3.8/src/ZEO/tests/testZEO.py	2008-12-19 13:42:05 UTC (rev 94192)
+++ ZODB/branches/3.8/src/ZEO/tests/testZEO.py	2008-12-19 14:35:54 UTC (rev 94193)
@@ -41,8 +41,6 @@
      PackableStorage, Synchronization, ConflictResolution, RevisionStorage, \
      MTStorage, ReadOnlyStorage
 
-from ZODB.tests.testDemoStorage import DemoStorageWrappedBase
-
 from ZEO.ClientStorage import ClientStorage
 
 import ZEO.zrpc.connection
@@ -60,15 +58,6 @@
     def invalidate(self, *args):
         pass
 
-class OneTimeTests(unittest.TestCase):
-
-    def checkZEOVersionNumber(self):
-        import ZEO
-        # Starting with ZODB 3.4, the ZODB and ZEO version numbers should
-        # be identical.
-        self.assertEqual(ZODB.__version__, ZEO.version)
-
-
 class CreativeGetState(persistent.Persistent):
     def __getstate__(self):
         self.name = 'me'
@@ -406,46 +395,6 @@
         self.assertEqual(db._invalidatedCache, base+1)
     
 
-class DemoStorageWrappedAroundClientStorage(DemoStorageWrappedBase):
-
-    def getConfig(self):
-        return """<mappingstorage 1/>"""
-
-    def _makeBaseStorage(self):
-        logger.info("setUp() %s", self.id())
-        port = get_port()
-        zconf = forker.ZEOConfig(('', port))
-        zport, adminaddr, pid, path = forker.start_zeo_server(self.getConfig(),
-                                                              zconf, port)
-        self._pids = [pid]
-        self._servers = [adminaddr]
-        self._conf_path = path
-        _base = ClientStorage(zport, '1', cache_size=20000000,
-                                      min_disconnect_poll=0.5, wait=1,
-                                      wait_timeout=60)
-        _base.registerDB(DummyDB())
-        return _base
-
-    def tearDown(self):
-        DemoStorageWrappedBase.tearDown(self)
-        os.remove(self._conf_path)
-        for server in self._servers:
-            forker.shutdown_zeo_server(server)
-        if hasattr(os, 'waitpid'):
-            # Not in Windows Python until 2.3
-            for pid in self._pids:
-                os.waitpid(pid, 0)
-
-
-test_classes = [OneTimeTests,
-                FileStorageTests,
-                MappingStorageTests,
-                DemoStorageWrappedAroundClientStorage,
-                HeartbeatTests,
-                CatastrophicClientLoopFailure,
-                ConnectionInvalidationOnReconnect,
-               ]
-
 class CommonBlobTests:
 
     def tearDown(self):
@@ -952,8 +901,12 @@
     connection closed
     """
 
-test_classes = [FileStorageTests, MappingStorageTests, DemoStorageTests,
-                BlobAdaptedFileStorageTests, BlobWritableCacheTests]
+test_classes = [
+    HeartbeatTests, CatastrophicClientLoopFailure,
+    ConnectionInvalidationOnReconnect, FileStorageTests,
+    MappingStorageTests, DemoStorageTests,
+    BlobAdaptedFileStorageTests, BlobWritableCacheTests,
+    ]
 
 def test_suite():
     suite = unittest.TestSuite()



More information about the Zodb-checkins mailing list