Commit ad1c795f authored by Barry Warsaw's avatar Barry Warsaw

_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).
parent f6c271cf
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
import os import os
import errno import errno
from bsddb3Storage.BerkeleyBase import BerkeleyConfig
from ZODB.tests.StorageTestBase import StorageTestBase from ZODB.tests.StorageTestBase import StorageTestBase
DBHOME = 'test-db' DBHOME = 'test-db'
...@@ -37,9 +39,14 @@ class BerkeleyTestBase(StorageTestBase): ...@@ -37,9 +39,14 @@ class BerkeleyTestBase(StorageTestBase):
raise raise
def _mk_dbhome(self, dir): 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) os.mkdir(dir)
try: try:
return self.ConcreteStorage(dir) return self.ConcreteStorage(dir, config=config)
except: except:
self._zap_dbhome(dir) self._zap_dbhome(dir)
raise raise
......
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