fix intermintent hang on remote server disconnect
All checks were successful
Blockstorage/repertory/pipeline/head This commit looks good
All checks were successful
Blockstorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@@ -115,6 +115,7 @@ TEST(json_serialize_test, can_handle_host_config) {
|
|||||||
TEST(json_serialize_test, can_handle_remote_config) {
|
TEST(json_serialize_test, can_handle_remote_config) {
|
||||||
remote::remote_config cfg{
|
remote::remote_config cfg{
|
||||||
.api_port = 1024U,
|
.api_port = 1024U,
|
||||||
|
.conn_timeout_ms = 22U,
|
||||||
.encryption_token = "token",
|
.encryption_token = "token",
|
||||||
.host_name_or_ip = "host",
|
.host_name_or_ip = "host",
|
||||||
.max_connections = 11U,
|
.max_connections = 11U,
|
||||||
@@ -124,6 +125,7 @@ TEST(json_serialize_test, can_handle_remote_config) {
|
|||||||
|
|
||||||
json data(cfg);
|
json data(cfg);
|
||||||
EXPECT_EQ(1024U, data.at(JSON_API_PORT).get<std::uint16_t>());
|
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",
|
EXPECT_STREQ("token",
|
||||||
data.at(JSON_ENCRYPTION_TOKEN).get<std::string>().c_str());
|
data.at(JSON_ENCRYPTION_TOKEN).get<std::string>().c_str());
|
||||||
EXPECT_STREQ("host",
|
EXPECT_STREQ("host",
|
||||||
@@ -135,6 +137,7 @@ TEST(json_serialize_test, can_handle_remote_config) {
|
|||||||
{
|
{
|
||||||
auto cfg2 = data.get<remote::remote_config>();
|
auto cfg2 = data.get<remote::remote_config>();
|
||||||
EXPECT_EQ(cfg2.api_port, cfg.api_port);
|
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.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_STREQ(cfg2.host_name_or_ip.c_str(), cfg.host_name_or_ip.c_str());
|
||||||
EXPECT_EQ(cfg2.max_connections, cfg.max_connections);
|
EXPECT_EQ(cfg2.max_connections, cfg.max_connections);
|
||||||
|
Reference in New Issue
Block a user