by bradfitz · 5y ago · 0 comments
ORMs: consider yourself lucky. They try to make SQL easy by auto-generating terrible SQL.
Testing latency: we want to run many unit tests very quickly without high start-up cost. Launching MySQL/PostgreSQL docker containers and running tests against Real Databases is slower than we'd like.
Dependencies: Docker and those MySQL or PostgreSQL servers in containers.
So it's not really in our patience budget for adding a mysqld or postgres start up (possible docker pull, create its schema, etc).
With the amount of explaining and skepticism you're having to deal with in most of the threads here (plenty of reasonable questions, some seem to approach the question with the assumption that your approach is totally wrong) I feel compelled to comment on how nice such a fast feedback loop would be just so it's known that you're not listing these benefits into an ether that doesn't appreciate them.
Mind you, I build ML/statisical models, so my integration/e2e tests are definitely not going to get down to 8 seconds.
It would create a nice flow to get feedback from your test suite that quickly.
Edit: 3s for global setup/teardown. Not per test function/suite.
I mean, that's what my old company did pre-Docker. It works, but it's tedious.
We've definitely done some whack-a-mole with allocations in the engine, and of course there's always things getting changed/added still.