Пример #1
0
    def test_etcdreadtimeouterror_exception(self):

        utdocker.stop_container(*ETCD_NAMES)
        c = etcd.Client(host=HOSTS, read_timeout=1)
        self.assertRaises(etcd.EtcdReadTimeoutError,
                          c.api_execute,
                          '/v2/keys/abc',
                          'GET',
                          timeout=1,
                          raise_read_timeout=True)
Пример #2
0
    def tearDown(self):

        utdocker.stop_container(zk_name)
        utdocker.remove_container(zk_name)

        dd('remove_container: ' + zk_name)
Пример #3
0
    def test_next_server(self):

        utdocker.stop_container('etcd_t0')
        c = etcd.Client(host=HOSTS, read_timeout=2)
        c.set('key', 'val')
        self.assertIn('key', c)
Пример #4
0
    def test_nomoremachine_exception(self):

        utdocker.stop_container(*ETCD_NAMES)
        c = etcd.Client(host=HOSTS, read_timeout=1)
        self.assertRaises(etcd.NoMoreMachineError, c.get, '/key')
    def tearDown(self):

        utdocker.stop_container(zk_name)
        utdocker.remove_container(zk_name)

        dd('remove_container: ' + zk_name)