[CalendarServer-changes] [10283] CalendarServer/branches/users/glyph/queue-locking-and-timing

source_changes at macosforge.org source_changes at macosforge.org
Fri Jan 4 16:39:54 PST 2013


Revision: 10283
          http://trac.calendarserver.org//changeset/10283
Author:   glyph at apple.com
Date:     2013-01-04 16:39:54 -0800 (Fri, 04 Jan 2013)
Log Message:
-----------
Clarify error behavior of committing an already-committed transaction.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/ienterprise.py
    CalendarServer/branches/users/glyph/queue-locking-and-timing/twistedcaldav/test/test_wrapping.py

Property Changed:
----------------
    CalendarServer/branches/users/glyph/queue-locking-and-timing/

Modified: CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/ienterprise.py
===================================================================
--- CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/ienterprise.py	2013-01-05 00:39:53 UTC (rev 10282)
+++ CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/ienterprise.py	2013-01-05 00:39:54 UTC (rev 10283)
@@ -109,7 +109,9 @@
         Commit changes caused by this transaction.
 
         @return: L{Deferred} which fires with C{None} upon successful
-            completion of this transaction.
+            completion of this transaction, or fails if this transaction could
+            not be committed.  It fails with L{AlreadyFinishedError} if the
+            transaction has already been committed or rolled back.
         """
 
 

Modified: CalendarServer/branches/users/glyph/queue-locking-and-timing/twistedcaldav/test/test_wrapping.py
===================================================================
--- CalendarServer/branches/users/glyph/queue-locking-and-timing/twistedcaldav/test/test_wrapping.py	2013-01-05 00:39:53 UTC (rev 10282)
+++ CalendarServer/branches/users/glyph/queue-locking-and-timing/twistedcaldav/test/test_wrapping.py	2013-01-05 00:39:54 UTC (rev 10283)
@@ -248,8 +248,8 @@
                                       % (pathType, pathType))
             yield req.process()
             self.assertEquals(req.chanRequest.code, 404)
-            self.assertRaises(AlreadyFinishedError,
-                              req._newStoreTransaction.commit)
+            yield self.failUnlessFailure(req._newStoreTransaction.commit(),
+                                         AlreadyFinishedError)
 
 
     @inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130104/80b4ff81/attachment.html>


More information about the calendarserver-changes mailing list