From: Gregory P. Smith Date: Wed, 28 May 2003 08:26:43 +0000 (+0000) Subject: Wrap the cursor functions with dbutils.DeadlockWrap to deal with the X-Git-Tag: v2.3c1~593 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc6e94a0fadd5913d8e14453f69cc3942f13ccca;p=python Wrap the cursor functions with dbutils.DeadlockWrap to deal with the expected DBLockDeadLockErrors. --- diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py index 48e8c9a813..71b6c3087c 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -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()