fixed some repository-related tests

This commit is contained in:
Sascha Kühl
2025-10-01 15:39:58 +02:00
parent 5d2d6d4a30
commit 12905e3df3
10 changed files with 45 additions and 15 deletions
+4 -2
View File
@@ -4,7 +4,7 @@
#include <thread>
namespace matador::sql {
identifiable_connection::identifiable_connection(const size_t id, connection conn)
identifiable_connection::identifiable_connection(const size_t id, connection &&conn)
: id(id)
, conn(std::move(conn)){}
@@ -57,7 +57,9 @@ connection_pool::connection_pool(const std::string& dns, size_t count)
: info_(connection_info::parse(dns)) {
connection_repo_.reserve(count);
while (count) {
connection_repo_.emplace_back(count, connection{info_});
connection c(info_);
connection_repo_.emplace_back(count, std::move(c));
// connection_repo_.emplace_back(count, connection{info_});
auto &conn = connection_repo_.back();
idle_connections_.emplace(conn.id, &conn);
// Todo: handle result