Fix CI unit tests (#5196)

- Add retries for rpc client
- Add dynamic port allocation for rpc servers
This commit is contained in:
Olek
2025-01-28 10:45:59 -05:00
committed by Qi Zhao
parent 1d0acf1490
commit f3d39ec680
31 changed files with 293 additions and 146 deletions

View File

@@ -104,7 +104,7 @@ Section::append(std::vector<std::string> const& lines)
bool
Section::exists(std::string const& name) const
{
return lookup_.find(name) != lookup_.end();
return lookup_.contains(name);
}
std::ostream&
@@ -120,13 +120,13 @@ operator<<(std::ostream& os, Section const& section)
bool
BasicConfig::exists(std::string const& name) const
{
return map_.find(name) != map_.end();
return map_.contains(name);
}
Section&
BasicConfig::section(std::string const& name)
{
return map_[name];
return map_.emplace(name, name).first->second;
}
Section const&
@@ -163,7 +163,7 @@ BasicConfig::deprecatedClearSection(std::string const& section)
void
BasicConfig::legacy(std::string const& section, std::string value)
{
map_[section].legacy(std::move(value));
map_.emplace(section, section).first->second.legacy(std::move(value));
}
std::string