Add integration test

This commit is contained in:
Raúl Marín 2023-03-27 16:40:15 +02:00
parent 83b68caccc
commit d2cb4eb9fb

View File

@ -98,3 +98,19 @@ def test_replica_inserts_with_keeper_disconnect(started_cluster):
finally: finally:
node1.query("DROP TABLE IF EXISTS r SYNC") node1.query("DROP TABLE IF EXISTS r SYNC")
def test_query_timeout_with_zk_down(started_cluster):
node1.query(
"CREATE TABLE zk_down (a UInt64, b String) ENGINE=ReplicatedMergeTree('/test/zk_down', '0') ORDER BY tuple()"
)
cluster.stop_zookeeper_nodes(["zoo1", "zoo2", "zoo3"])
start_time = time.time()
with pytest.raises(QueryRuntimeException):
node1.query(
"INSERT INTO zk_down SELECT number, toString(number) FROM numbers(10) SETTINGS insert_keeper_max_retries=10000, insert_keeper_retry_max_backoff_ms=1000, max_execution_time=1"
)
finish_time = time.time()
assert finish_time - start_time < 10