[Zodb-checkins] CVS: ZODB3/ZODB/tests - TransactionalUndoStorage.py:1.24

Jeremy Hylton jeremy@zope.com
Fri, 18 Oct 2002 20:03:14 -0400


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

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

Some storages get confused by tid == 0.


=== ZODB3/ZODB/tests/TransactionalUndoStorage.py 1.23 => 1.24 ===
--- ZODB3/ZODB/tests/TransactionalUndoStorage.py:1.23	Fri Oct 18 14:01:39 2002
+++ ZODB3/ZODB/tests/TransactionalUndoStorage.py	Fri Oct 18 20:03:14 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]