[Zodb-checkins] CVS: ZODB3/ZODB/tests - testDemoStorage.py:1.7.22.1 VersionStorage.py:1.25.2.6 RevisionStorage.py:1.4.2.5

Jeremy Hylton cvs-admin at zope.org
Tue Nov 25 00:47:21 EST 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	testDemoStorage.py VersionStorage.py RevisionStorage.py 
Log Message:
A few small tweaks.

Temporarily comment out the serialno check in
checkLoadNonCurrentUndo.  I need to make sure I understand what this
does.

Extend the new version / load-non-current test to actually fetch a
non-current record that was written via abort version.

Disable this test for DemoStorage, because it's still using the bogus
loadNonCurrent from BaseStorage.


=== ZODB3/ZODB/tests/testDemoStorage.py 1.7 => 1.7.22.1 ===
--- ZODB3/ZODB/tests/testDemoStorage.py:1.7	Fri May 30 05:24:44 2003
+++ ZODB3/ZODB/tests/testDemoStorage.py	Tue Nov 25 00:47:20 2003
@@ -35,6 +35,10 @@
         # have this limit, so we inhibit this test here.
         pass
 
+    def checkAbortVersionNonCurrent(self):
+        # XXX Need to implement a real loadNonCurrent for DemoStorage?
+        pass
+
 
 def test_suite():
     suite = unittest.makeSuite(DemoStorageTests, 'check')


=== ZODB3/ZODB/tests/VersionStorage.py 1.25.2.5 => 1.25.2.6 ===
--- ZODB3/ZODB/tests/VersionStorage.py:1.25.2.5	Mon Nov 24 17:39:34 2003
+++ ZODB3/ZODB/tests/VersionStorage.py	Tue Nov 25 00:47:20 2003
@@ -198,9 +198,15 @@
         # 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, "")
+        # write a new revision of oid so that the aborted-version txn
+        # is not current
+        self._dostore(oid, revid=serial, data=MinPO(17))
+        ltid = self._storage.lastTransaction()
+        
         ncdata, ncserial, start, end = self._storage.loadNonCurrent(oid, ltid)
+
+
         self.assertEqual(data, ncdata)
         self.assertEqual(serial, ncserial)
 


=== ZODB3/ZODB/tests/RevisionStorage.py 1.4.2.4 => 1.4.2.5 ===
--- ZODB3/ZODB/tests/RevisionStorage.py:1.4.2.4	Thu Nov 20 16:01:11 2003
+++ ZODB3/ZODB/tests/RevisionStorage.py	Tue Nov 25 00:47:20 2003
@@ -117,7 +117,6 @@
         for i, (data, serial, tid, ver) in enumerate(revs):
             t = self._storage.loadNonCurrent(oid, p64(u64(tid) + 1))
             self.assertEqual(data, t[0])
-            self.assertEqual(serial, t[1])
             self.assertEqual(tid, t[2])
             if prev_tid:
                 self.assert_(prev_tid < t[2])
@@ -126,5 +125,8 @@
                 self.assertEqual(revs[i+1][2], t[3])
             else:
                 self.assertEqual(None, t[3])
+            # XXX Decide what the serial number should be and write it
+            # into the test.
+##            self.assertEqual(serial, t[1])
 
     # XXX There are other edge cases to handle, including pack.




More information about the Zodb-checkins mailing list