[Zodb-checkins] CVS: ZODB3/BDBStorage/tests -
test_storage_api.py:1.33 test_autopack.py:1.15
BerkeleyTestBase.py:1.20
Jeremy Hylton
jeremy at zope.com
Wed Dec 24 11:02:42 EST 2003
Update of /cvs-repository/ZODB3/BDBStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv27465/BDBStorage/tests
Modified Files:
test_storage_api.py test_autopack.py BerkeleyTestBase.py
Log Message:
Merge MVCC branch to the HEAD.
=== ZODB3/BDBStorage/tests/test_storage_api.py 1.32 => 1.33 ===
--- ZODB3/BDBStorage/tests/test_storage_api.py:1.32 Thu Sep 11 13:01:30 2003
+++ ZODB3/BDBStorage/tests/test_storage_api.py Wed Dec 24 11:02:05 2003
@@ -21,20 +21,32 @@
from BDBStorage.tests import BerkeleyTestBase
from ZODB.tests.BasicStorage import BasicStorage
+from ZODB.tests.HistoryStorage import HistoryStorage
+from ZODB.tests.IteratorStorage import IteratorStorage, ExtendedIteratorStorage
+from ZODB.tests.MTStorage import MTStorage
+from ZODB.tests.PackableStorage import PackableStorage, PackableUndoStorage
+from ZODB.tests.PersistentStorage import PersistentStorage
+from ZODB.tests.ReadOnlyStorage import ReadOnlyStorage
+from ZODB.tests.RecoveryStorage import RecoveryStorage
from ZODB.tests.RevisionStorage import RevisionStorage
-from ZODB.tests.VersionStorage import VersionStorage
+from ZODB.tests.Synchronization import SynchronizedStorage
from ZODB.tests.TransactionalUndoStorage import TransactionalUndoStorage
from ZODB.tests.TransactionalUndoVersionStorage import \
TransactionalUndoVersionStorage
-from ZODB.tests.PackableStorage import PackableStorage
-from ZODB.tests.HistoryStorage import HistoryStorage
-from ZODB.tests.IteratorStorage import IteratorStorage, ExtendedIteratorStorage
-from ZODB.tests.RecoveryStorage import RecoveryStorage
+from ZODB.tests.VersionStorage import VersionStorage
+
from ZODB.tests import ConflictResolution
-class MinimalTest(BerkeleyTestBase.MinimalTestBase, BasicStorage):
+class MinimalTest(BerkeleyTestBase.MinimalTestBase,
+ BasicStorage,
+ MTStorage,
+ PackableStorage,
+ ReadOnlyStorage,
+ SynchronizedStorage,
+ ):
+
def checkVersionedStoreAndLoad(self):
# This storage doesn't support versions, so we should get an exception
oid = self._storage.new_oid()
@@ -47,11 +59,15 @@
RevisionStorage, VersionStorage,
TransactionalUndoStorage,
TransactionalUndoVersionStorage,
- PackableStorage,
+ PackableStorage, PackableUndoStorage,
HistoryStorage,
IteratorStorage, ExtendedIteratorStorage,
ConflictResolution.ConflictResolvingStorage,
- ConflictResolution.ConflictResolvingTransUndoStorage):
+ ConflictResolution.ConflictResolvingTransUndoStorage,
+ SynchronizedStorage,
+ PersistentStorage,
+ MTStorage,
+ ReadOnlyStorage):
pass
=== ZODB3/BDBStorage/tests/test_autopack.py 1.14 => 1.15 ===
--- ZODB3/BDBStorage/tests/test_autopack.py:1.14 Fri Nov 28 11:44:43 2003
+++ ZODB3/BDBStorage/tests/test_autopack.py Wed Dec 24 11:02:05 2003
@@ -52,12 +52,13 @@
class TestAutopackBase(BerkeleyTestBase):
- def _config(self):
+ def _config(self, read_only=False):
config = BerkeleyConfig()
# Autopack every 1 second, 2 seconds into the past, no classic packs
config.frequency = 1
config.packtime = 2
config.gcpack = 0
+ config.read_only = read_only
return config
def _wait_for_next_autopack(self):
@@ -114,13 +115,14 @@
class TestAutomaticClassicPack(TestAutopackBase):
ConcreteStorage = BDBFullStorage
- def _config(self):
+ def _config(self, read_only=False):
config = BerkeleyConfig()
# Autopack every 1 second, 2 seconds into the past, classic packing
# every time.
config.frequency = 1
config.packtime = 2
config.gcpack = 1
+ config.read_only = read_only
return config
def testAutomaticClassicPack(self):
@@ -196,10 +198,11 @@
class TestMinimalPack(TestAutopackBase):
ConcreteStorage = BDBMinimalStorage
- def _config(self):
+ def _config(self, read_only=False):
config = BerkeleyConfig()
# Autopack every 3 seconds
config.frequency = 3
+ config.read_only = read_only
return config
def testRootUnreachable(self):
=== ZODB3/BDBStorage/tests/BerkeleyTestBase.py 1.19 => 1.20 ===
--- ZODB3/BDBStorage/tests/BerkeleyTestBase.py:1.19 Thu Oct 2 18:14:00 2003
+++ ZODB3/BDBStorage/tests/BerkeleyTestBase.py Wed Dec 24 11:02:05 2003
@@ -29,20 +29,21 @@
class BerkeleyTestBase(StorageTestBase):
- def _config(self):
+ def _config(self, read_only=False):
# Checkpointing just slows the tests down because we have to wait for
# the thread to properly shutdown. This can take up to 10 seconds, so
# for the purposes of the test suite we shut off this thread.
config = BerkeleyConfig()
config.interval = 0
+ config.read_only = read_only
return config
def _envdir(self):
return DBHOME
- def open(self):
+ def open(self, read_only=False):
self._storage = self.ConcreteStorage(
- self._envdir(), config=self._config())
+ self._envdir(), config=self._config(read_only))
def _zap_dbhome(self, dir=None):
if dir is None:
More information about the Zodb-checkins
mailing list