fix intermintent hang on remote server disconnect
All checks were successful
Blockstorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2025-09-20 21:18:02 -05:00
parent 8aa7cf40d3
commit 4f5a347d2c

View File

@@ -115,6 +115,7 @@ TEST(json_serialize_test, can_handle_host_config) {
TEST(json_serialize_test, can_handle_remote_config) {
remote::remote_config cfg{
.api_port = 1024U,
.conn_timeout_ms = 22U,
.encryption_token = "token",
.host_name_or_ip = "host",
.max_connections = 11U,
@@ -124,6 +125,7 @@ TEST(json_serialize_test, can_handle_remote_config) {
json data(cfg);
EXPECT_EQ(1024U, data.at(JSON_API_PORT).get<std::uint16_t>());
EXPECT_EQ(22U, data.at(JSON_CONNECT_TIMEOUT_MS).get<std::uint16_t>());
EXPECT_STREQ("token",
data.at(JSON_ENCRYPTION_TOKEN).get<std::string>().c_str());
EXPECT_STREQ("host",
@@ -135,6 +137,7 @@ TEST(json_serialize_test, can_handle_remote_config) {
{
auto cfg2 = data.get<remote::remote_config>();
EXPECT_EQ(cfg2.api_port, cfg.api_port);
EXPECT_EQ(cfg2.conn_timeout_ms, cfg.conn_timeout_ms);
EXPECT_STREQ(cfg2.encryption_token.c_str(), cfg.encryption_token.c_str());
EXPECT_STREQ(cfg2.host_name_or_ip.c_str(), cfg.host_name_or_ip.c_str());
EXPECT_EQ(cfg2.max_connections, cfg.max_connections);