From 41ecd3339c5f0b5ee2ac2e3926ec8383e9da8dc5 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 20 Sep 2025 21:13:02 -0500 Subject: [PATCH] fix intermintent hang on remote server disconnect --- .../repertory_test/src/app_config_test.cpp | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/repertory/repertory_test/src/app_config_test.cpp b/repertory/repertory_test/src/app_config_test.cpp index f491f2f8..699b14c5 100644 --- a/repertory/repertory_test/src/app_config_test.cpp +++ b/repertory/repertory_test/src/app_config_test.cpp @@ -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);