[Checkins] SVN: zc.zkzeo/trunk/src/zc/zkzeo/ - In test mode, use a shorter asyncore loop timeout to make the server
Jim Fulton
jim at zope.com
Tue Feb 7 19:05:00 UTC 2012
Log message for revision 124325:
- In test mode, use a shorter asyncore loop timeout to make the server
shut down faster.
Changed:
U zc.zkzeo/trunk/src/zc/zkzeo/README.txt
U zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py
-=-
Modified: zc.zkzeo/trunk/src/zc/zkzeo/README.txt
===================================================================
--- zc.zkzeo/trunk/src/zc/zkzeo/README.txt 2012-02-07 17:58:03 UTC (rev 124324)
+++ zc.zkzeo/trunk/src/zc/zkzeo/README.txt 2012-02-07 19:04:59 UTC (rev 124325)
@@ -329,6 +329,9 @@
- Added a static extra to force a dependency on
``zc-zookeeper-static``.
+- In test mode, use a shorter asyncore loop timeout to make the server
+ shut down faster.
+
- Fixed: zc.zkzeo depended on ``zc.zk [static]``, which forced
installation of ``zc-zookeeper-static``, which should be optional.
Modified: zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py
===================================================================
--- zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py 2012-02-07 17:58:03 UTC (rev 124324)
+++ zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py 2012-02-07 19:04:59 UTC (rev 124325)
@@ -47,8 +47,16 @@
self.__zk.register_server(self.options.zkpath, addr[:2], **props)
if self.__testing is not None:
+
+ if not hasattr(self.server, 'loop'):
+ # XXX the patch below doesn't work in 3.11. We'll
+ # probably want to add a timeout option in the
+ # long run.
+ self.server.loop_forever = lambda : asyncore.loop(.1)
+
self.__testing()
+
if self.__using_dynamic_port:
self.__zk = zc.zk.ZooKeeper(
self.options.zkconnection,
More information about the checkins
mailing list