Ejemplo n.º 1
0
 def test_buildZooKeeperHosts_single(self):
     hosts = [
         zk.ZooKeeperConnectionConfig('127.0.0.1',
                                      port=2181,
                                      chroot='/test1')
     ]
     self.assertEqual('127.0.0.1:2181/test1', zk.buildZooKeeperHosts(hosts))
Ejemplo n.º 2
0
 def test_buildZooKeeperHosts_single(self):
     hosts = [
         zk.ZooKeeperConnectionConfig('127.0.0.1', port=2181,
                                      chroot='/test1')
     ]
     self.assertEqual('127.0.0.1:2181/test1',
                      zk.buildZooKeeperHosts(hosts))
Ejemplo n.º 3
0
 def test_buildZooKeeperHosts_multiple(self):
     hosts = [
         dict(host='127.0.0.1', port=2181, chroot='/test1'),
         dict(host='127.0.0.2', port=2182, chroot='/test2')
     ]
     self.assertEqual('127.0.0.1:2181/test1,127.0.0.2:2182/test2',
                      zk.buildZooKeeperHosts(hosts))
Ejemplo n.º 4
0
 def test_buildZooKeeperHosts_multiple(self):
     hosts = [
         dict(host='127.0.0.1', port=2181, chroot='/test1'),
         dict(host='127.0.0.2', port=2182, chroot='/test2')
     ]
     self.assertEqual('127.0.0.1:2181/test1,127.0.0.2:2182/test2',
                      zk.buildZooKeeperHosts(hosts))
Ejemplo n.º 5
0
 def test_buildZooKeeperHosts_single(self):
     hosts = [
         dict(host='127.0.0.1', port=2181, chroot='/test1')
     ]
     self.assertEqual('127.0.0.1:2181/test1',
                      zk.buildZooKeeperHosts(hosts))
Ejemplo n.º 6
0
 def test_buildZooKeeperHosts_single(self):
     hosts = [dict(host='127.0.0.1', port=2181, chroot='/test1')]
     self.assertEqual('127.0.0.1:2181/test1', zk.buildZooKeeperHosts(hosts))