Wrap the cursor functions with dbutils.DeadlockWrap to deal with the

expected DBLockDeadLockErrors.
This commit is contained in:
Gregory P. Smith 2003-05-28 08:26:43 +00:00
parent 5772513f0f
commit bc6e94a0fa
1 changed files with 2 additions and 2 deletions

View 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()