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: Fix tests to reduce chance of "database is locked" error. #4651

Open
terriko opened this issue Dec 24, 2024 · 0 comments
Open

test: Fix tests to reduce chance of "database is locked" error. #4651

terriko opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers tests

Comments

@terriko
Copy link
Contributor

terriko commented Dec 24, 2024

I'm getting more of these errors in CI lately:

sqlite3.OperationalError: database is locked

While these crop up somewhat randomly when we try to run a lot of tests in parallel, it would be really nice to have two things:

  1. Make sure -u never or equivalent is set in all tests unless the update code is what's being tested.
  2. Any tests that do need to call update code should be moved into the long tests "synchronous" group so that we don't try to run them all at once. I thought most of them were in there or the network-may-fail group but we may have missed one or more.

I think those two test fixes are both pretty doable by a beginner. I'd also like to handle a back off and retry when that error is thrown, but I'll put that in a separate issue since it may be harder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers tests
Projects
None yet
Development

No branches or pull requests

1 participant