[Checkins] SVN: zc.zkzeo/trunk/src/zc/zkzeo/ - Fixed: Didn't work with explicit configuration of port 0, which is

jim cvs-admin at zope.org
Tue Jul 10 20:06:23 UTC 2012


Log message for revision 127312:
  - Fixed: Didn't work with explicit configuration of port 0, which is
    recently supported by ZConfig.
  

Changed:
  U   zc.zkzeo/trunk/src/zc/zkzeo/README.txt
  U   zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py
  U   zc.zkzeo/trunk/src/zc/zkzeo/tests.py

-=-
Modified: zc.zkzeo/trunk/src/zc/zkzeo/README.txt
===================================================================
--- zc.zkzeo/trunk/src/zc/zkzeo/README.txt	2012-07-10 18:15:07 UTC (rev 127311)
+++ zc.zkzeo/trunk/src/zc/zkzeo/README.txt	2012-07-10 20:06:18 UTC (rev 127312)
@@ -368,6 +368,12 @@
 Change History
 ==============
 
+0.3.2 (2012-07-10)
+------------------
+
+- Fixed: Didn't work with explicit configuration of port 0, which is
+  recently supported by ZConfig.
+
 0.3.1 (2012-06-26)
 ------------------
 

Modified: zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py
===================================================================
--- zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py	2012-07-10 18:15:07 UTC (rev 127311)
+++ zc.zkzeo/trunk/src/zc/zkzeo/runzeo.py	2012-07-10 20:06:18 UTC (rev 127312)
@@ -83,7 +83,7 @@
         ZEO.runzeo.ZEOServer.clear_socket(self)
 
     def check_socket(self):
-        if self.options.address[1] == None:
+        if not self.options.address[1]:
             self.options.address = self.options.address[0], 0
             self.__using_dynamic_port = True
             return

Modified: zc.zkzeo/trunk/src/zc/zkzeo/tests.py
===================================================================
--- zc.zkzeo/trunk/src/zc/zkzeo/tests.py	2012-07-10 18:15:07 UTC (rev 127311)
+++ zc.zkzeo/trunk/src/zc/zkzeo/tests.py	2012-07-10 20:06:18 UTC (rev 127312)
@@ -75,6 +75,28 @@
     FailedConnect: 192.0.2.42:2181
     """
 
+def server_exception_when_no_zookeeper_running_and_dynamic_port_0():
+    """If ZooKeeper isn't running, we get an immediate error.
+
+    >>> zc.zkzeo.runzeo.test('''
+    ...   <zeo>
+    ...      address :0
+    ...   </zeo>
+    ...
+    ...   <zookeeper>
+    ...      connection 192.0.2.42:2181
+    ...      path /databases/demo
+    ...   </zookeeper>
+    ...
+    ...   <filestorage>
+    ...      path demo.fs
+    ...   </filestorage>
+    ... ''', threaded=False)
+    Traceback (most recent call last):
+    ...
+    FailedConnect: 192.0.2.42:2181
+    """
+
 def server_session_timeout_setting():
     """
     >>> stop = zc.zkzeo.runzeo.test('''



More information about the checkins mailing list