From f83b24e2dcdf7c9dbe1fdb5e272671f2d892a916 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Tue, 19 Sep 2023 22:26:55 +0800 Subject: [PATCH] set require_lease_before_startup to true Signed-off-by: Ruihang Xia --- tests-integration/src/test_util.rs | 1 + tests-integration/tests/http.rs | 2 +- tests/conf/datanode-test.toml.template | 1 + tests/conf/standalone-test.toml.template | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests-integration/src/test_util.rs b/tests-integration/src/test_util.rs index 1dd199b18994..a6c0cf72fb65 100644 --- a/tests-integration/src/test_util.rs +++ b/tests-integration/src/test_util.rs @@ -292,6 +292,7 @@ pub fn create_tmp_dir_and_datanode_opts( pub(crate) fn create_datanode_opts(store: ObjectStoreConfig, home_dir: String) -> DatanodeOptions { DatanodeOptions { node_id: Some(0), + require_lease_before_startup: true, storage: StorageConfig { data_home: home_dir, store, diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index b5c3db2f4f47..94cea9e0bf6a 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -606,7 +606,7 @@ pub async fn test_config_api(store_type: StorageType) { let expected_toml_str = format!( r#"mode = "standalone" node_id = 0 -require_lease_before_startup = false +require_lease_before_startup = true rpc_addr = "127.0.0.1:3001" rpc_runtime_size = 8 enable_telemetry = true diff --git a/tests/conf/datanode-test.toml.template b/tests/conf/datanode-test.toml.template index 2aa63829033f..a7ce09693fe7 100644 --- a/tests/conf/datanode-test.toml.template +++ b/tests/conf/datanode-test.toml.template @@ -1,5 +1,6 @@ node_id = 1 mode = 'distributed' +require_lease_before_startup = true rpc_addr = '127.0.0.1:4100' rpc_hostname = '127.0.0.1' rpc_runtime_size = 8 diff --git a/tests/conf/standalone-test.toml.template b/tests/conf/standalone-test.toml.template index ef6fcff866c1..f81f73b9a24e 100644 --- a/tests/conf/standalone-test.toml.template +++ b/tests/conf/standalone-test.toml.template @@ -1,5 +1,6 @@ mode = 'standalone' enable_memory_catalog = false +require_lease_before_startup = true [wal] file_size = '1GB'