Summary
Add automated tests for vix::db::ConnectionPool and vix::db::PooledConn.
The pool is shared by every high-level DB operation and must behave correctly under concurrency, connection failures, invalid factories, and resource exhaustion.
Current behavior
The connection pool:
- creates connections through a factory;
- keeps idle connections in a queue;
- limits the total connection count;
- waits when the maximum is reached;
- validates reused connections with
ping();
- releases connections through
PooledConn.
No automated tests currently verify these guarantees.
Expected behavior
The tests must use deterministic fake connections and factories so pool behavior can be validated without depending on a real database engine.
Scope
Suggested files
modules/db/tests/fakes/FakeConnection.hpp
modules/db/tests/connection_pool_test.cpp
modules/db/tests/CMakeLists.txt
Acceptance criteria
Non-goals
This issue does not include:
- redesigning the connection pool API;
- adding asynchronous acquisition;
- adding pool metrics;
- database driver benchmarks.
Suggested labels
scope:db
type:ci
tests
sanitizers
help wanted
status:ready
Summary
Add automated tests for
vix::db::ConnectionPoolandvix::db::PooledConn.The pool is shared by every high-level DB operation and must behave correctly under concurrency, connection failures, invalid factories, and resource exhaustion.
Current behavior
The connection pool:
ping();PooledConn.No automated tests currently verify these guarantees.
Expected behavior
The tests must use deterministic fake connections and factories so pool behavior can be validated without depending on a real database engine.
Scope
Connectionimplementation for testing.PooledConndestruction.PooledConnmove construction.Suggested files
modules/db/tests/fakes/FakeConnection.hppmodules/db/tests/connection_pool_test.cppmodules/db/tests/CMakeLists.txtAcceptance criteria
Non-goals
This issue does not include:
Suggested labels
scope:dbtype:citestssanitizershelp wantedstatus:ready