[Zope-Checkins] CVS: ZODB3/ZODB/tests - TransactionalUndoStorage.py:1.26

Jeremy Hylton jeremy@zope.com
Thu, 24 Oct 2002 12:26:53 -0400


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv2811

Modified Files:
	TransactionalUndoStorage.py 
Log Message:
Don't use a tid of 0 for the first transaction.

(Re-applying a lost change.)
Some storages get confused by tid == 0.


=== ZODB3/ZODB/tests/TransactionalUndoStorage.py 1.25 => 1.26 ===
--- ZODB3/ZODB/tests/TransactionalUndoStorage.py:1.25	Wed Oct 23 15:06:36 2002
+++ ZODB3/ZODB/tests/TransactionalUndoStorage.py	Thu Oct 24 12:26:52 2002
@@ -556,7 +556,7 @@
         orig = []
         for i in range(BATCHES):
             t = Transaction()
-            tid = p64(i)
+            tid = p64(i + 1)
             s.tpc_begin(t, tid)
             for j in range(OBJECTS):
                 oid = s.new_oid()
@@ -602,7 +602,7 @@
             txn = iter[offset]
             offset += 1
             
-            tid = p64(i)
+            tid = p64(i + 1)
             eq(txn.tid, tid)
 
             L1 = [(rec.oid, rec.serial, rec.data_txn) for rec in txn]
@@ -621,7 +621,7 @@
             offset += 1
 
             # The undos are performed in reverse order.
-            otid = p64(BATCHES - 1 - i)
+            otid = p64(BATCHES - i)
             L1 = [(rec.oid, rec.data_txn) for rec in txn]
             L2 = [(oid, otid) for _tid, oid, revid in orig
                   if _tid == otid]