back

by thunderbong·6y ago·view on hn ↗
Until I started working in other frameworks, I thought this was the way it is done everywhere.

I still don't understand why in the software world we keep reinventing the same patterns again and again ad nauseum.

1 comments
As long as those tests can be done within a single block of code, that works fine. A lot of ORMs and connection pools do not play nicely with complex transactions. It is surprisingly difficult to get a single transaction to work correctly if the transaction happens across multiple API calls chained together, as would happen in an integration test. It would be nice if SQL databases and clients all had support for named transactions that can be created, accessed, updated, and finished all on different connections or sessions.