backend tests progress

This commit is contained in:
2024-01-29 07:22:28 +01:00
parent 615143efb0
commit 47848ff674
21 changed files with 410 additions and 27 deletions
+4 -3
View File
@@ -73,14 +73,15 @@ public:
using connection_pointer = connection_ptr<Connection>;
public:
connection_pool(const std::string &dns, unsigned int count)
connection_pool(const std::string &dns, size_t count)
: info_(connection_info::parse(dns)) {
connection_repo_.reserve(count);
for (auto i = 0U; i < count; ++i) {
connection_repo_.emplace_back(i+1, info_);
while (count) {
connection_repo_.emplace_back(count, info_);
auto &conn = connection_repo_.back();
idle_connections_.emplace(conn.first, &conn);
conn.second.open();
--count;
}
}