[CalendarServer-changes] [9717] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 16 14:49:54 PDT 2012


Revision: 9717
          http://trac.macosforge.org/projects/calendarserver/changeset/9717
Author:   glyph at apple.com
Date:     2012-08-16 14:49:53 -0700 (Thu, 16 Aug 2012)
Log Message:
-----------
Add a missing upcall.

Modified Paths:
--------------
    CalendarServer/trunk/twext/enterprise/adbapi2.py
    CalendarServer/trunk/twext/enterprise/test/test_adbapi2.py

Property Changed:
----------------
    CalendarServer/trunk/

Modified: CalendarServer/trunk/twext/enterprise/adbapi2.py
===================================================================
--- CalendarServer/trunk/twext/enterprise/adbapi2.py	2012-08-16 21:49:53 UTC (rev 9716)
+++ CalendarServer/trunk/twext/enterprise/adbapi2.py	2012-08-16 21:49:53 UTC (rev 9717)
@@ -925,6 +925,7 @@
         L{IReactorThreads} users, the connection work units are very long-lived
         and block until this service has been stopped.
         """
+        super(ConnectionPool, self).startService()
         tp = self.reactor.getThreadPool()
         self.reactor.suggestThreadPoolSize(tp.max + self.maxConnections)
 

Modified: CalendarServer/trunk/twext/enterprise/test/test_adbapi2.py
===================================================================
--- CalendarServer/trunk/twext/enterprise/test/test_adbapi2.py	2012-08-16 21:49:53 UTC (rev 9716)
+++ CalendarServer/trunk/twext/enterprise/test/test_adbapi2.py	2012-08-16 21:49:53 UTC (rev 9717)
@@ -489,7 +489,19 @@
         self.assertEquals(threadpool.max, defaultMax)
 
 
+    def test_isRunning(self):
+        """
+        L{ConnectionPool.startService} should set its C{running} attribute to
+        true.
+        """
+        pool = ConnectionPool(None)
+        pool.reactor = ClockWithThreads()
+        self.assertEquals(pool.running, False)
+        pool.startService()
+        self.assertEquals(pool.running, True)
 
+
+
 class ConnectionPoolHelper(object):
     """
     Connection pool setting-up facilities for tests that need a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120816/3682346d/attachment.html>


More information about the calendarserver-changes mailing list