]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
readerThread(): Add max_retries to both DeadlockWrap() calls. This
authorBarry Warsaw <barry@python.org>
Mon, 21 Jul 2003 23:01:34 +0000 (23:01 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 21 Jul 2003 23:01:34 +0000 (23:01 +0000)
may cause some tests to fail but it prevents them from hanging.

Lib/bsddb/test/test_thread.py

index 71b6c3087c2e834427b686c7aac453bf041d5f81..cf4237c3303981e38f497b04dc0cdf0404b3d7c3 100644 (file)
@@ -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()