Skip to content

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

Open
@terriko

Description

@terriko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions