Exemple #1
0
 def test_memleak_get_batch_keys(self):
     """测试get_batch_keys是否有内存泄露
     """
     key = "/test_group/service/codis"
     i = 0
     while i < 1:
         qconf.get_batch_keys(key)
         i = i + 1
Exemple #2
0
 def test_memleak_get_batch_keys(self):
     """测试get_batch_keys是否有内存泄露
     """
     key = "/test_group/service/codis"
     i = 0
     while i < 1:
         qconf.get_batch_keys(key)
         i = i + 1
Exemple #3
0
 def _get_qconf_data(self):
     """解决qconf get_batch_conf有内存泄露问题
     """
     qconf_data = {}
     data_keys = qconf.get_batch_keys(self.zk_path)
     for _key in data_keys:
         node_key = "{}/{}".format(self.zk_path, _key)
         qconf_data[_key] = qconf.get_conf(node_key)
     return qconf_data
Exemple #4
0
 def _get_qconf_data(self):
     """解决qconf get_batch_conf有内存泄露问题
     """
     qconf_data = {}
     data_keys = qconf.get_batch_keys(self.zk_path)
     for _key in data_keys:
         node_key = "{}/{}".format(self.zk_path, _key)
         qconf_data[_key] = qconf.get_conf(node_key)
     return qconf_data
Exemple #5
0
 def test_api(self):
     """测试基本api
     """
     key = "/test_group/service/codis"
     value = qconf.get_conf(key)
     keys = qconf.get_batch_keys(key)
     assert isinstance(keys, list)
     children = qconf.get_batch_conf(key)
     assert isinstance(children, dict)
Exemple #6
0
 def test_api(self):
     """测试基本api
     """
     key = "/test_group/service/codis"
     value = qconf.get_conf(key)
     keys = qconf.get_batch_keys(key)
     assert isinstance(keys, list)
     children = qconf.get_batch_conf(key)
     assert isinstance(children, dict)