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

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

Open
dullbananas opened this issue Aug 15, 2024 · 2 comments

Comments

@dullbananas
Copy link
Collaborator

  • 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
@dessalines
Copy link
Member

Could be faster, but also probably not worth the effort, as the tests don't take that long. Federation tests are much slower anyway.

@dullbananas
Copy link
Collaborator Author

Test failures causing some subsequent tests to fail is a big enough inconvenience in my opinion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants