[Zodb-checkins] CVS: ZODB3/bsddb3Storage/bsddb3Storage/tests - BerkeleyTestBase.py:1.10
Barry Warsaw
barry@wooz.org
Tue, 19 Nov 2002 15:38:03 -0500
Update of /cvs-repository/ZODB3/bsddb3Storage/bsddb3Storage/tests
In directory cvs.zope.org:/tmp/cvs-serv1913
Modified Files:
BerkeleyTestBase.py
Log Message:
_mk_dbhome(): Explicity disable the checkpointing thread, since it
just slows the tests down (because we might have to wait up to 10
seconds for the thread to cleanly exit).
=== ZODB3/bsddb3Storage/bsddb3Storage/tests/BerkeleyTestBase.py 1.9 => 1.10 ===
--- ZODB3/bsddb3Storage/bsddb3Storage/tests/BerkeleyTestBase.py:1.9 Sat Nov 9 00:54:35 2002
+++ ZODB3/bsddb3Storage/bsddb3Storage/tests/BerkeleyTestBase.py Tue Nov 19 15:38:02 2002
@@ -16,6 +16,8 @@
import os
import errno
+
+from bsddb3Storage.BerkeleyBase import BerkeleyConfig
from ZODB.tests.StorageTestBase import StorageTestBase
DBHOME = 'test-db'
@@ -37,9 +39,14 @@
raise
def _mk_dbhome(self, dir):
+ # 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
os.mkdir(dir)
try:
- return self.ConcreteStorage(dir)
+ return self.ConcreteStorage(dir, config=config)
except:
self._zap_dbhome(dir)
raise