When running tests on PostgreSQL with a max_connections value of 10, the tests are failing because connections are still in use. We need to add proper resource handling so that even if we get an exception, the transaction is rolled back and the connections are released. |