[CalendarServer-changes] [9570] CalendarServer/branches/users/glyph/q
source_changes at macosforge.org
source_changes at macosforge.org
Sat Aug 11 01:54:17 PDT 2012
Revision: 9570
http://trac.macosforge.org/projects/calendarserver/changeset/9570
Author: glyph at apple.com
Date: 2012-08-11 01:54:17 -0700 (Sat, 11 Aug 2012)
Log Message:
-----------
make the test dumber, which by the way happens to produce the exception we're really getting
Modified Paths:
--------------
CalendarServer/branches/users/glyph/q/twext/enterprise/adbapi2.py
CalendarServer/branches/users/glyph/q/twext/enterprise/test/test_adbapi2.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/q/
Modified: CalendarServer/branches/users/glyph/q/twext/enterprise/adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/q/twext/enterprise/adbapi2.py 2012-08-11 08:54:16 UTC (rev 9569)
+++ CalendarServer/branches/users/glyph/q/twext/enterprise/adbapi2.py 2012-08-11 08:54:17 UTC (rev 9570)
@@ -1,4 +1,4 @@
-# -*- test-case-name: twext.enterprise.test.test_adbapi2 -*-
+# -*- test-case-name: twext.enterprise.test.test_adbapi2.ConnectionPoolTests.test_shutdownDuringAttemptSuccess -*-
##
# Copyright (c) 2010-2012 Apple Inc. All rights reserved.
#
Modified: CalendarServer/branches/users/glyph/q/twext/enterprise/test/test_adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/q/twext/enterprise/test/test_adbapi2.py 2012-08-11 08:54:16 UTC (rev 9569)
+++ CalendarServer/branches/users/glyph/q/twext/enterprise/test/test_adbapi2.py 2012-08-11 08:54:17 UTC (rev 9570)
@@ -19,6 +19,7 @@
"""
from itertools import count
+from Queue import Empty
from zope.interface.verify import verifyClass, verifyObject
from zope.interface.declarations import implements
@@ -382,7 +383,10 @@
"""
Fire all deferreds previously returned from submit.
"""
- while not self.stopped and self._q.queue and self._qpull():
+ try:
+ while self._qpull():
+ pass
+ except Empty:
pass
@@ -648,8 +652,8 @@
def test_shutdownDuringAttemptSuccess(self):
"""
- If L{ConnectionPool.stopService} is called while a connection attempt is
- outstanding, the resulting L{Deferred} won't be fired until the
+ If L{ConnectionPool.stopService} is called while a connection attempt
+ is outstanding, the resulting L{Deferred} won't be fired until the
connection attempt has finished; in this case, succeeded.
"""
self.pauseHolders()
@@ -666,8 +670,8 @@
def test_shutdownDuringAttemptFailed(self):
"""
- If L{ConnectionPool.stopService} is called while a connection attempt is
- outstanding, the resulting L{Deferred} won't be fired until the
+ If L{ConnectionPool.stopService} is called while a connection attempt
+ is outstanding, the resulting L{Deferred} won't be fired until the
connection attempt has finished; in this case, failed.
"""
self.factory.defaultFail()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120811/4e8c3472/attachment.html>
More information about the calendarserver-changes
mailing list