mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Fix the ZK includes reload path in `Server.cpp` to use `config().replace` instead of `removeConfiguration`/`add`/`setConfig`, consistent with the reload callback. This ensures command-line overrides are preserved when ZK includes are loaded. Add integration test `test_config_not_overriding_args` that verifies command-line arguments are not overridden by config file values (including when ZK includes are used). Based on the test from #71452. Co-Authored-By: Claude Opus 4.6 <[email protected]>
30 lines
637 B
Python
30 lines
637 B
Python
import pytest
|
|
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
cluster = ClickHouseCluster(__file__)
|
|
node = cluster.add_instance(
|
|
"node",
|
|
main_configs=["configs/config_zk_include_test.xml"],
|
|
with_zookeeper=True,
|
|
extra_args="--shutdown_wait_unfinished 3",
|
|
)
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def start_cluster():
|
|
try:
|
|
cluster.start()
|
|
yield cluster
|
|
finally:
|
|
cluster.shutdown()
|
|
|
|
|
|
def test_config_not_overriding_args(start_cluster):
|
|
assert (
|
|
node.query(
|
|
"select value from system.server_settings where name = 'shutdown_wait_unfinished'"
|
|
)
|
|
== "3\n"
|
|
)
|