Commit 9bbb2b7a 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.

Removed test levels. Test levels are an invitation to inadvertently
not run tests.
parent 9a9a16a5
......@@ -24,7 +24,6 @@ from ZODB.tests import StorageTestBase, BasicStorage, \
MTStorage, ReadOnlyStorage, IteratorStorage, RecoveryStorage
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle
from ZODB.tests.testDemoStorage import DemoStorageWrappedBase
import asyncore
import doctest
......@@ -59,15 +58,6 @@ class DummyDB:
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'
......@@ -267,8 +257,6 @@ class FullGenericTests(
class FileStorageRecoveryTests(StorageTestBase.StorageTestBase,
RecoveryStorage.RecoveryStorage):
level = 2
def getConfig(self):
return """\
<filestorage 1>
......@@ -319,7 +307,6 @@ class FileStorageRecoveryTests(StorageTestBase.StorageTestBase,
class FileStorageTests(FullGenericTests):
"""Test ZEO backed by a FileStorage."""
level = 2
def getConfig(self):
return """\
......@@ -532,46 +519,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(self)
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 getConfig(self):
......@@ -1207,7 +1154,10 @@ slow_test_classes = [
DemoStorageTests, FileStorageTests, MappingStorageTests,
]
quick_test_classes = [FileStorageRecoveryTests, ConfigurationTests]
quick_test_classes = [
FileStorageRecoveryTests, ConfigurationTests, HeartbeatTests,
CatastrophicClientLoopFailure, ConnectionInvalidationOnReconnect,
]
class ServerManagingClientStorage(ClientStorage):
......
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