ooni / data

OONI Data CLI and Pipeline v5
https://docs.ooni.org/data
8 stars 4 forks source link

Improve speed of unittests #52

Closed hellais closed 6 months ago

hellais commented 7 months ago

Currently the unittests take a bit too long to run locally even if you have run them before.

I think the reason for this is that the netinfodb is refreshed every time you run it by doing update call.

This can be improved by adding support for caching of the netinfodb directly by putting a timestamp of when the last sync was run and only do a sync if it hasn't been updated in say the last hour.

The reason to do this, is that the faster the tests are, the more likely a developer is to run them often and the more bugs we are going to be able to spot that way.

hellais commented 6 months ago

The speed boost thanks to caching has been merged. I am closing this.