-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test are too slow #339
Comments
By fixing #337 and running with
Would you be interested in me modifying the default setup? |
Faster tests would be nice, although haven't found this test suite unreasonably slow. But thanks for the interest! All tests in under 30 seconds sounds appealing! I'm worried that test parallelization would end up ignoring the API requests rate limits like at: manubot/manubot/cite/pubmed.py Lines 380 to 395 in 3ff3000
Not sure if pytest-xdist has support for grouping certain tests together. Is this for local test execution or CI? If for local, users can possibly use pytest-xdist without changing on CI?
I think marking slow or network related tests might be a good solution here as well. |
Test time does depends on whether the tested services are responsive, when all services are responsive, 25 seconds on 4 theads is feasible. Today I ran test on main using 20 threads and took 42 minutes:
On #338 I ran tests and got the same results (20 theads as well) on 1.5 minutes:
I'm interested mainly on local development, as I'm using the tests to know whether I break something, but waiting 42 minutes for a simple change is a no go. It seems like multiple workers running tests would be rate limited by thread and could indeed surpass the rate limited services threshold, but if that is a problem when running the suite we could reduce the rate at which we make request (on the tests), or set a lock for a rate limited service so that only one test can run concurrently on the service. |
It may also be a good idea to acquire network input in a cache which is valid only for a few hours and run the tests on those when they are available. However, the current architecture does not support the separation of network input and processing. Would that be a desired refactoring? |
A test suite should run as fast as possible to allow a fast feedback loop.
Most of the tests take too long because they:
If fixing those two issues is not enough, we could maybe identify slow tests and mark them as slow to address any concern left.
The text was updated successfully, but these errors were encountered: