Kaydet (Commit) f6682141 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

fix bsddb get_name and set_daemon usage

üst a759f8db
...@@ -117,7 +117,7 @@ class LockingTestCase(unittest.TestCase): ...@@ -117,7 +117,7 @@ class LockingTestCase(unittest.TestCase):
deadlock_detection.end=False deadlock_detection.end=False
deadlock_detection.count=0 deadlock_detection.count=0
t=Thread(target=deadlock_detection) t=Thread(target=deadlock_detection)
t.set_daemon(True) t.daemon = True
t.start() t.start()
self.env.set_timeout(100000, db.DB_SET_LOCK_TIMEOUT) self.env.set_timeout(100000, db.DB_SET_LOCK_TIMEOUT)
anID = self.env.lock_id() anID = self.env.lock_id()
...@@ -143,7 +143,7 @@ class LockingTestCase(unittest.TestCase): ...@@ -143,7 +143,7 @@ class LockingTestCase(unittest.TestCase):
self.assertTrue(deadlock_detection.count>0) self.assertTrue(deadlock_detection.count>0)
def theThread(self, sleepTime, lockType): def theThread(self, sleepTime, lockType):
name = current_thread().get_name() name = current_thread().name
if lockType == db.DB_LOCK_WRITE: if lockType == db.DB_LOCK_WRITE:
lt = "write" lt = "write"
else: else:
......
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