Skip to content

Add integration tests to check for DB connection leaks

João Pereira requested to merge conn-leak into master

Database connection leaks can happen if a context is not properly canceled after delivering an API response or if we forget to close an iterator (like when iterating over sql.Rows). Connection leaks will most likely lead to a connection pool saturation and therefore an availability compromise.

This MR adds tests to ensure that after requests against each API handler/method, the DB connection pool is full once again (no open/in use/idle connections) and no connections leak.

Related to #252 (closed).

Edited by João Pereira

Merge request reports