Commit bc6e94a0 authored by Gregory P. Smith's avatar Gregory P. Smith

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

expected DBLockDeadLockErrors.
parent 5772513f
No related merge requests found
...@@ -267,12 +267,12 @@ class SimpleThreadedBase(BaseThreadedTestCase): ...@@ -267,12 +267,12 @@ class SimpleThreadedBase(BaseThreadedTestCase):
for loop in range(5): for loop in range(5):
c = d.cursor() c = d.cursor()
count = 0 count = 0
rec = c.first() rec = dbutils.DeadlockWrap(c.first)
while rec: while rec:
count += 1 count += 1
key, data = rec key, data = rec
self.assertEqual(self.makeData(key), data) self.assertEqual(self.makeData(key), data)
rec = c.next() rec = dbutils.DeadlockWrap(c.next)
if verbose: if verbose:
print "%s: found %d records" % (name, count) print "%s: found %d records" % (name, count)
c.close() c.close()
......
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