zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1157686 - in /zookeeper/trunk: CHANGES.txt src/contrib/zkpython/src/test/connection_test.py src/contrib/zkpython/src/test/zktestbase.py
Date Mon, 15 Aug 2011 00:39:12 GMT
Author: mahadev
Date: Mon Aug 15 00:39:11 2011
New Revision: 1157686

URL: http://svn.apache.org/viewvc?rev=1157686&view=rev
Log:
ZOOKEEPER-1141. zkpython fails tests under python 2.4. (phunt via mahadev)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py
    zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1157686&r1=1157685&r2=1157686&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Mon Aug 15 00:39:11 2011
@@ -288,6 +288,8 @@ BUGFIXES: 
   ZOOKEEPER-1055. check for duplicate ACLs in addACL() and create().
   (Eugene Koontz via mahadev)
 
+  ZOOKEEPER-1141. zkpython fails tests under python 2.4. (phunt via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py?rev=1157686&r1=1157685&r2=1157686&view=diff
==============================================================================
--- zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py (original)
+++ zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py Mon Aug 15 00:39:11 2011
@@ -76,7 +76,7 @@ class ConnectionTest(zktestbase.TestBase
         cv.wait(15.0)
         cv.release()
         self.assertEqual(self.connected, True, "Connection timed out to " + self.host)
-        self.assertEqual(True, all( [ zookeeper.state(handle) == zookeeper.CONNECTED_STATE
for handle in handles ] ),
+        self.assertEqual(True, self.all( [ zookeeper.state(handle) == zookeeper.CONNECTED_STATE
for handle in handles ] ),
                          "Not all connections succeeded")
         oldhandle = handles[3]
         zookeeper.close(oldhandle)
@@ -115,7 +115,7 @@ class ConnectionTest(zktestbase.TestBase
             path = "/zkpython-test-handles-%s" % str(i)
             self.assertEqual(path, zookeeper.create(h, path, "", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL))
 
-        self.assertEqual(True, all( zookeeper.close(h) == zookeeper.OK for h in handles ))
+        self.assertEqual(True, self.all( zookeeper.close(h) == zookeeper.OK for h in handles
))
 
     def testversionstringexists(self):
         self.assertTrue(hasattr(zookeeper, '__version__'))

Modified: zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py?rev=1157686&r1=1157685&r2=1157686&view=diff
==============================================================================
--- zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py (original)
+++ zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py Mon Aug 15 00:39:11 2011
@@ -93,3 +93,9 @@ class TestBase(unittest.TestCase):
     def tearDown(self):
         if self.connected:
             zookeeper.close(self.handle)
+
+    def all(self, iterable):
+        for element in iterable:
+            if not element:
+                return False
+        return True



Mime
View raw message