3 ms·
Can you put some numbers on how much time is too much? I've never seen anyone go this far to avoid using a database for what sounds like the only "real" reason
by nmjohn 6y ago
Can you put some numbers on how much time is too much? I've never seen anyone go this far to avoid using a database for what sounds like the only "real" reason is to avoid testing latency (a problem which has many other solutions) so I am really confused, but curious to understand!
- viraptor 6y agoNot sure what their requirements are, but I'm using a "spin up an isolated postgres instance per test run" solution and end up with ~3s overhead to do that. (Using https://pypi.org/project/testing.postgresql/ https://pypi.org/project/testing.postgresql/ Edit: 3s for global setup/teardown. Not per test function/suite.
- bradfitz 6y agoRunning all of our control server tests (including integration tests) right now takes 8 seconds, and we're not even incredibly happy with that. There's no reason it should even be half that. So it's not really in our patience budget for adding a mysqld or postgres start up (possible docker pull, create its schema, etc).
- ac2u 6y ago>right now takes 8 seconds, and we're not even incredibly happy with that 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.
- disgruntledphd2 6y agoYeah, I'm inspired to reduce the cost of my tests to get to a better place as a result of this. Mind you, I build ML/statisical models, so my integration/e2e tests are definitely not going to get down to 8 seconds.
- xupybd 6y agoWow that's really quick. I can see why that would be very desirable. It would create a nice flow to get feedback from your test suite that quickly.