summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2006-01-27 07:06:15 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2006-01-27 07:06:15 (GMT)
commit3d344e8b07c84320422f7ce88e3f470c4d53138d (patch)
tree5dc49edd46e56d662d27d7dba68182869de0d646 /Lib/bsddb/test
parent8a474047994ffaa5fa19a1fb7a24426635e1dbc1 (diff)
downloadcpython-3d344e8b07c84320422f7ce88e3f470c4d53138d.zip
cpython-3d344e8b07c84320422f7ce88e3f470c4d53138d.tar.gz
cpython-3d344e8b07c84320422f7ce88e3f470c4d53138d.tar.bz2
Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER
(test cases and dbobj wrapping)
Diffstat (limited to 'Lib/bsddb/test')
-rw-r--r--Lib/bsddb/test/test_basics.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py
index 844d6b7..24c4038 100644
--- a/Lib/bsddb/test/test_basics.py
+++ b/Lib/bsddb/test/test_basics.py
@@ -11,6 +11,7 @@ import string
import tempfile
from pprint import pprint
import unittest
+import time
try:
# For Pythons w/distutils pybsddb
@@ -64,6 +65,8 @@ class BasicTestCase(unittest.TestCase):
try:
self.env = db.DBEnv()
self.env.set_lg_max(1024*1024)
+ self.env.set_tx_max(30)
+ self.env.set_tx_timestamp(int(time.time()))
self.env.set_flags(self.envsetflags, 1)
self.env.open(homeDir, self.envflags | db.DB_CREATE)
tempfile.tempdir = homeDir