Closed greg-rychlewski closed 9 months ago
I was reading Elixir Forum and saw a reference to this old post: https://elixirforum.com/t/experimenting-with-running-mysql-tests-in-parallel/49108.
It's a pretty clever way to run async tests with MySQL. They create 1 database for each connection in their test pool and then use the configure option to choose which one to connect to.
configure
Also, when I was looking into what pool_index is used for, it seems like it was made for similar purposes in this repo's unit tests: https://github.com/elixir-ecto/db_connection/blob/master/test/test_support.exs#L142
pool_index
Maybe it would be a good idea to document this option and provide some clues to how it can be used in tests?
I will be happy with documenting it. PR please? :)
I was reading Elixir Forum and saw a reference to this old post: https://elixirforum.com/t/experimenting-with-running-mysql-tests-in-parallel/49108.
It's a pretty clever way to run async tests with MySQL. They create 1 database for each connection in their test pool and then use the
configure
option to choose which one to connect to.Also, when I was looking into what
pool_index
is used for, it seems like it was made for similar purposes in this repo's unit tests: https://github.com/elixir-ecto/db_connection/blob/master/test/test_support.exs#L142Maybe it would be a good idea to document this option and provide some clues to how it can be used in tests?