[Python-checkins] python/dist/src/Lib/bsddb/test test_thread.py,1.5,1.6

greg@users.sourceforge.net greg@users.sourceforge.net
Wed, 28 May 2003 01:26:46 -0700


Update of /cvsroot/python/python/dist/src/Lib/bsddb/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16258

Modified Files:
	test_thread.py 
Log Message:
Wrap the cursor functions with dbutils.DeadlockWrap to deal with the
expected DBLockDeadLockErrors.


Index: test_thread.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bsddb/test/test_thread.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_thread.py	28 Jan 2003 17:20:44 -0000	1.5
--- test_thread.py	28 May 2003 08:26:43 -0000	1.6
***************
*** 268,277 ****
              c = d.cursor()
              count = 0
!             rec = c.first()
              while rec:
                  count += 1
                  key, data = rec
                  self.assertEqual(self.makeData(key), data)
!                 rec = c.next()
              if verbose:
                  print "%s: found %d records" % (name, count)
--- 268,277 ----
              c = d.cursor()
              count = 0
!             rec = dbutils.DeadlockWrap(c.first)
              while rec:
                  count += 1
                  key, data = rec
                  self.assertEqual(self.makeData(key), data)
!                 rec = dbutils.DeadlockWrap(c.next)
              if verbose:
                  print "%s: found %d records" % (name, count)