Hacker News new | ask | show | jobs
by srer 1624 days ago
One supposes horrifically slow might be a bit subjective.

I notice in a VM on my laptop establishing the initial connection to postgres seems to take 2-3ms, and running a trivial query takes 300-1000us.

I routinely involve the database in unit tests, it is certainly slower but my primary concern is the correct behavior of production code which uses real databases.

1 comments

If testing using the db is slowing you down that means the test has discovered slow code, and worked, not that you should get rid of the test.