mirror of
https://github.com/python/cpython
synced 2026-09-29 10:15:30 +03:00
readerThread(): Add max_retries to both DeadlockWrap() calls. This
may cause some tests to fail but it prevents them from hanging.
This commit is contained in:
parent
40b2e83924
commit
e3ea281280
1 changed files with 2 additions and 2 deletions
|
|
@ -267,12 +267,12 @@ class SimpleThreadedBase(BaseThreadedTestCase):
|
|||
for loop in range(5):
|
||||
c = d.cursor()
|
||||
count = 0
|
||||
rec = dbutils.DeadlockWrap(c.first)
|
||||
rec = dbutils.DeadlockWrap(c.first, max_retries=10)
|
||||
while rec:
|
||||
count += 1
|
||||
key, data = rec
|
||||
self.assertEqual(self.makeData(key), data)
|
||||
rec = dbutils.DeadlockWrap(c.next)
|
||||
rec = dbutils.DeadlockWrap(c.next, max_retries=10)
|
||||
if verbose:
|
||||
print "%s: found %d records" % (name, count)
|
||||
c.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue