[Zodb-checkins] SVN: ZODB/branches/jim-readCurrent/src/ZODB/tests/testConnection.py Use read conflict errors.

Jim Fulton jim at zope.com
Tue Aug 31 11:36:24 EDT 2010


Log message for revision 116064:
  Use read conflict errors.
  

Changed:
  U   ZODB/branches/jim-readCurrent/src/ZODB/tests/testConnection.py

-=-
Modified: ZODB/branches/jim-readCurrent/src/ZODB/tests/testConnection.py
===================================================================
--- ZODB/branches/jim-readCurrent/src/ZODB/tests/testConnection.py	2010-08-31 15:33:12 UTC (rev 116063)
+++ ZODB/branches/jim-readCurrent/src/ZODB/tests/testConnection.py	2010-08-31 15:36:24 UTC (rev 116064)
@@ -625,13 +625,13 @@
     >>> import ZODB.MappingStorage
     >>> store = ZODB.MappingStorage.MappingStorage()
 
-    >>> from ZODB.POSException import ConflictError
+    >>> from ZODB.POSException import ReadConflictError
     >>> bad = set()
     >>> def checkCurrentSerialInTransaction(oid, serial, trans):
     ...     print 'checkCurrentSerialInTransaction', `oid`
     ...     if not trans == transaction.get(): print 'oops'
     ...     if oid in bad:
-    ...         raise ConflictError(oid=oid)
+    ...         raise ReadConflictError(oid=oid)
 
     >>> store.checkCurrentSerialInTransaction = checkCurrentSerialInTransaction
 
@@ -686,7 +686,7 @@
     >>> transaction.commit()
     Traceback (most recent call last):
     ...
-    ConflictError: database conflict error (oid 0x01)
+    ReadConflictError: database read conflict error (oid 0x01)
 
     >>> transaction.abort()
 
@@ -695,7 +695,7 @@
     >>> def checkCurrentSerialInTransaction(oid, serial, trans):
     ...     if not trans == transaction.get(): print 'oops'
     ...     print 'checkCurrentSerialInTransaction', `oid`
-    ...     store.badness = ConflictError(oid=oid)
+    ...     store.badness = ReadConflictError(oid=oid)
 
     >>> def tpc_vote(t):
     ...     if store.badness:
@@ -714,7 +714,7 @@
     >>> transaction.commit()
     Traceback (most recent call last):
     ...
-    ConflictError: database conflict error (oid 0x01)
+    ReadConflictError: database read conflict error (oid 0x01)
 
     >>> transaction.abort()
 
@@ -733,7 +733,7 @@
     >>> transaction.commit()
     Traceback (most recent call last):
     ...
-    ConflictError: database conflict error (oid 0x01)
+    ReadConflictError: database read conflict error (oid 0x01)
 
     >>> transaction.abort()
 
@@ -743,7 +743,7 @@
     >>> transaction.commit()
     Traceback (most recent call last):
     ...
-    ConflictError: database conflict error (oid 0x01)
+    ReadConflictError: database read conflict error (oid 0x01)
 
     >>> transaction.abort()
 



More information about the Zodb-checkins mailing list