]> granicus.if.org Git - python/commitdiff
Wrap the cursor functions with dbutils.DeadlockWrap to deal with the
authorGregory P. Smith <greg@mad-scientist.com>
Wed, 28 May 2003 08:26:43 +0000 (08:26 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Wed, 28 May 2003 08:26:43 +0000 (08:26 +0000)
expected DBLockDeadLockErrors.

Lib/bsddb/test/test_thread.py

index 48e8c9a8131a6c539d3ff1a9bd16b64c9bcc9ad1..71b6c3087c2e834427b686c7aac453bf041d5f81 100644 (file)
@@ -267,12 +267,12 @@ class SimpleThreadedBase(BaseThreadedTestCase):
         for loop in range(5):
             c = d.cursor()
             count = 0
-            rec = c.first()
+            rec = dbutils.DeadlockWrap(c.first)
             while rec:
                 count += 1
                 key, data = rec
                 self.assertEqual(self.makeData(key), data)
-                rec = c.next()
+                rec = dbutils.DeadlockWrap(c.next)
             if verbose:
                 print "%s: found %d records" % (name, count)
             c.close()