fix intermintent hang on remote server disconnect
Some checks are pending
Blockstorage/repertory/pipeline/head Build queued...

This commit is contained in:
2025-09-20 21:13:02 -05:00
parent 8e3c7d4eeb
commit 41ecd3339c

View File

@@ -484,14 +484,16 @@ static void common_tests(app_config &config, provider_type prov) {
remote_cfg1.max_connections = 4U;
remote_cfg1.recv_timeout_ms = 5U;
remote_cfg1.send_timeout_ms = 6U;
remote_cfg1.conn_timeout_ms = 7U;
remote::remote_config remote_cfg2{};
remote_cfg1.api_port = 6U;
remote_cfg1.encryption_token = "5";
remote_cfg1.host_name_or_ip = "4";
remote_cfg1.max_connections = 3U;
remote_cfg1.recv_timeout_ms = 2U;
remote_cfg1.send_timeout_ms = 1U;
remote_cfg1.api_port = 7U;
remote_cfg1.encryption_token = "6";
remote_cfg1.host_name_or_ip = "6";
remote_cfg1.max_connections = 4U;
remote_cfg1.recv_timeout_ms = 3U;
remote_cfg1.send_timeout_ms = 2U;
remote_cfg1.conn_timeout_ms = 1U;
ASSERT_NE(remote_cfg1, remote_cfg2);
@@ -506,6 +508,7 @@ static void common_tests(app_config &config, provider_type prov) {
remote_cfg1.max_connections = 10U;
remote_cfg1.recv_timeout_ms = 11U;
remote_cfg1.send_timeout_ms = 12U;
remote_cfg1.conn_timeout_ms = 13U;
auto value = cfg.set_value_by_name(
fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_API_PORT),
@@ -513,6 +516,12 @@ static void common_tests(app_config &config, provider_type prov) {
EXPECT_STREQ(std::to_string(remote_cfg3.api_port).c_str(),
value.c_str());
value = cfg.set_value_by_name(
fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_CONNECT_TIMEOUT_MS),
std::to_string(remote_cfg3.conn_timeout_ms));
EXPECT_STREQ(std::to_string(remote_cfg3.conn_timeout_ms).c_str(),
value.c_str());
value = cfg.set_value_by_name(
fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_ENCRYPTION_TOKEN),
remote_cfg3.encryption_token);