Commit 53f94301 authored by Jim Fulton's avatar Jim Fulton

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.
parent 76243655
......@@ -41,8 +41,6 @@ from ZODB.tests import StorageTestBase, BasicStorage, VersionStorage, \
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 @@ class DummyDB:
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 @@ class ConnectionInvalidationOnReconnect(
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 @@ def tpc_finish_error():
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment