[Zope-Checkins] CVS: ZODB3/ZODB/tests - VersionStorage.py:1.25.2.5

Jeremy Hylton cvs-admin at zope.org
Mon Nov 24 17:39:35 EST 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	VersionStorage.py 
Log Message:
Add test of serial number returned by loadNonCurrent() after abortVersion().


=== ZODB3/ZODB/tests/VersionStorage.py 1.25.2.4 => 1.25.2.5 ===
--- ZODB3/ZODB/tests/VersionStorage.py:1.25.2.4	Thu Nov 20 16:01:11 2003
+++ ZODB3/ZODB/tests/VersionStorage.py	Mon Nov 24 17:39:34 2003
@@ -91,8 +91,8 @@
         eq(tid, revid2)
         data, serial, tid, ver = self._storage.loadEx(oid, "other version")
         eq(zodb_unpickle(data), MinPO(12))
-        eq(serial, revid1)
         eq(tid, revid2)
+        eq(serial, revid1)
 
     def checkVersionedLoadErrors(self):
         oid = self._storage.new_oid()
@@ -192,6 +192,17 @@
         eq(oids[0], oid)
         data, revid = self._storage.load(oid, '')
         eq(zodb_unpickle(data), MinPO(51))
+
+    def checkAbortVersionNonCurrent(self):
+        # Make sure the non-current serial number is correctly
+        # after a version is aborted.
+        oid, version = self._setup_version()
+        self._abortVersion(version)
+        ltid = self._storage.lastTransaction()
+        data, serial, tid, ver = self._storage.loadEx(oid, "")
+        ncdata, ncserial, start, end = self._storage.loadNonCurrent(oid, ltid)
+        self.assertEqual(data, ncdata)
+        self.assertEqual(serial, ncserial)
 
     def checkAbortVersionErrors(self):
         eq = self.assertEqual




More information about the Zope-Checkins mailing list