[CalendarServer-changes] [10064] CalendarServer/branches/users/glyph/one-home-list-api
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 16 14:49:04 PST 2012
Revision: 10064
http://trac.calendarserver.org//changeset/10064
Author: glyph at apple.com
Date: 2012-11-16 14:49:04 -0800 (Fri, 16 Nov 2012)
Log Message:
-----------
Make tests fail if any transactions are outstanding.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/test/util.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/one-home-list-api/
Modified: CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/test/util.py
===================================================================
--- CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/test/util.py 2012-11-16 22:49:02 UTC (rev 10063)
+++ CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/test/util.py 2012-11-16 22:49:04 UTC (rev 10064)
@@ -193,7 +193,16 @@
store.label = currentTestID
cp.startService()
def stopIt():
- return cp.stopService()
+ # active transactions should have been shut down.
+ wasBusy = len(cp._busy)
+ busyText = repr(cp._busy)
+ stop = cp.stopService()
+ def checkWasBusy(ignored):
+ if wasBusy:
+ testCase.fail("Outstanding Transactions: " + busyText)
+ return ignored
+ stop.addBoth(checkWasBusy)
+ return stop
testCase.addCleanup(stopIt)
yield self.cleanStore(testCase, store)
returnValue(store)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121116/af29d524/attachment.html>
More information about the calendarserver-changes
mailing list