未验证 提交 a9c50caa 编写于 作者: A alesapin 提交者: GitHub

Merge pull request #19942 from ClickHouse/fix_test_keeper_b2b_test

Fix test keeper integration tests
......@@ -8,7 +8,7 @@ from multiprocessing.dummy import Pool
cluster = ClickHouseCluster(__file__)
node = cluster.add_instance('node', main_configs=['configs/enable_test_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True)
from kazoo.client import KazooClient
from kazoo.client import KazooClient, KazooState
_genuine_zk_instance = None
_fake_zk_instance = None
......@@ -26,6 +26,13 @@ def get_fake_zk():
if not _fake_zk_instance:
print("node", cluster.get_instance_ip("node"))
_fake_zk_instance = KazooClient(hosts=cluster.get_instance_ip("node") + ":9181")
def reset_last_zxid_listener(state):
print("Fake zk callback called for state", state)
global _fake_zk_instance
# reset last_zxid -- fake server doesn't support it
_fake_zk_instance.last_zxid = 0
_fake_zk_instance.add_listener(reset_last_zxid_listener)
_fake_zk_instance.start()
return _fake_zk_instance
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册