i cannot believe that development on sonata is currently stuck on me not being able to deploy a working ephemeral database in nix
aaaaaaaaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@star@amazonawaws.com
@star@amazonawaws.com
@star@amazonawaws.compool.close().await;. The intention was to ensure that the connection would actually be released at the end of the test. A bit ago, I switched to passing PostgreSQL transactions to methods requiring DB access, instead of giving each method access to the whole pool. With that. calling pool.close().await while transactions are technically still in-flight would mean that it would wait for all transactions to close, then close the connection. But the transactions would never close. In the actual server binary, connections get either committed or discarded in the end. But in unit-/integration tests, that might not happen, and it would be the test environments' job to ensure that the transaction is either commited or rolled back. sqlx does this by itself, at the end of every test. Me calling pool.close().await caused a deadlock, I guess