Skip to content
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 for inefficient queries #3376

Open
mouse-reeve opened this issue Jun 8, 2024 · 1 comment · May be fixed by #3380
Open

Test for inefficient queries #3376

mouse-reeve opened this issue Jun 8, 2024 · 1 comment · May be fixed by #3380

Comments

@mouse-reeve
Copy link
Member

Is your feature request related to a problem? Please describe.
I’m running into long running database queries that cause worker timeouts when deploying code on b.s. The queries that end up being problematic aren’t obvious to me, and don’t cause problems at a smaller scale so they don’t show up in basic tests.

Describe the solution you'd like
If possible, I’d like to check the query time in the Django tests. This would probably require creating a pre populated test dataset, which would cause issues for other tests that assume the state of the database. I also don’t know if this would work very well? But right now I keep breaking production whenever I do a release and that isn’t a great situation

@hughrun
Copy link
Contributor

hughrun commented Jun 8, 2024

This would probably require creating a pre populated test dataset, which would cause issues for other tests that assume the state of the database.

I think this is a good idea that might help streamline tests, and if it breaks some existing tests they should be re-written. Though I guess this might take a while. Would we load data in with a fixture?

@mouse-reeve mouse-reeve linked a pull request Jun 9, 2024 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants