-
Notifications
You must be signed in to change notification settings - Fork 201
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
Unit test timings - worst offenders #3678
Comments
I don't think so I'm afraid. In the specific tests themselves we are doing nothing special. Just creating some nodes in the setup and then checking results after migration. I think the majority of the time is just the database schema being migrated back and forth. |
If we can't fix them, maybe we should mark them as slow so they can easily be deselected? Reference: https://docs.pytest.org/en/latest/mark.html |
There's a new top offender in town
git seems to blame @sphuber |
#5376 should fix that one |
Thanks for the fix, it's gone
|
Update - looks like verdi group tests are not leading test durations
I wonder whether this indicates that something about groups got slower? |
I see you searched for The reason is not that groups got slower but due to #5846 . It changed certain CLI tests to run through an actual subprocess which was necessary to catch a critical bug that was introduced in v2.0.0, but was missed because we were running the CLI tests in memory. I spent a lot of effort to try and minimize the additional runtime in the tests, but this was the best tradeoff I could find. |
Cheers, good to know that this is behind those timing increases. I will close this issue for now, since there is no immediate action we're planning. |
One rule of thumb for writing unit tests is that they should test one unit of code and run in the blink of an eye.
While this is not always possible, we have a large number of tests that violate this rule quite drastically, and should probably be refactored to save everybody's time.
Here are the worst offenders in terms of runtime as of 2019-12-16:
@CasperWA Looking at number 1, perhaps it is not necessary to export every small graph individually but rather first create all of the data, then export, then import and compare?
@sphuber Many of the long-running tests are obviously migrations. I wonder, is there anything that could be sped up there in general?
The text was updated successfully, but these errors were encountered: