[Zodb-checkins] SVN: ZODB/branches/zagy-lp509801/src/ZODB/tests/testblob.py added a testcase which shows the error

Christian Zagrodnick cz at gocept.com
Fri Jun 11 10:44:42 EDT 2010


Log message for revision 113354:
  added a testcase which shows the error
  
  

Changed:
  U   ZODB/branches/zagy-lp509801/src/ZODB/tests/testblob.py

-=-
Modified: ZODB/branches/zagy-lp509801/src/ZODB/tests/testblob.py
===================================================================
--- ZODB/branches/zagy-lp509801/src/ZODB/tests/testblob.py	2010-06-11 14:43:54 UTC (rev 113353)
+++ ZODB/branches/zagy-lp509801/src/ZODB/tests/testblob.py	2010-06-11 14:44:42 UTC (rev 113354)
@@ -563,6 +563,33 @@
     >>> db.close()
     """
 
+def savepoint_commits_without_invalidations_out_of_order():
+    """Make sure transactions with blobs can be commited without the
+    invalidations out of order error (LP #509801)
+
+    >>> bs = create_storage()
+    >>> db = DB(bs)
+    >>> conn = db.open()
+    >>> conn.root.b = ZODB.blob.Blob('initial')
+    >>> transaction.commit()
+    >>> conn.root.b.open('w').write('1')
+    >>> _ = transaction.savepoint()
+    >>> tm = transaction.TransactionManager()
+    >>> conn2 = db.open(transaction_manager=tm)
+    >>> conn2.root.b.open('w').write('2')
+    >>> _ = tm.savepoint()
+    >>> conn.root.b.open().read()
+    '1'
+    >>> conn2.root.b.open().read()
+    '2'
+    >>> tm.commit()
+    >>> transaction.commit()  # doctest: +IGNORE_EXCEPTION_DETAIL
+    Traceback (most recent call last):
+        ...
+    ConflictError: database conflict error...
+    >>> db.close()
+    """
+
 def savepoint_cleanup():
     """Make sure savepoint data gets cleaned up.
 



More information about the Zodb-checkins mailing list