Skip to content

Make database tests run in parallel and not fail because of other failed tests #4979

@dullbananas

Description

@dullbananas
  • Create a new build_db_pool_for_tests function which:
    • Builds the pool in a LazyCell which runs migrations and maybe inserts stuff in the initialization function
    • Gets a pooled connection, calls the AsyncConnection::begin_test_transaction method, and returns it by wrapping it in DbPool::Conn
  • Remove the serial attribute from tests, since concurrent transactions don't see each other's effects

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions